|
1 | 1 | # Manus AI PHP SDK |
2 | 2 |
|
| 3 | +<div align="center"> |
| 4 | + <img src="https://github.com/user-attachments/assets/eb30d0e5-3d22-4edb-bb42-dd4e751b5cf4" alt="Monica AI PHP SDK" style="max-width: 100%; height: auto;"> |
| 5 | +</div> |
| 6 | + |
3 | 7 | 🚀 Complete PHP library for integration with [Manus AI](https://manus.ai) API. Easily integrate Manus AI agent into your PHP applications with full Laravel support. |
4 | 8 |
|
5 | 9 | [](https://opensource.org/licenses/MIT) |
@@ -116,15 +120,30 @@ Tasks are the core of Manus AI - they represent AI agent work items that can per |
116 | 120 | [API Docs: Create Task](https://open.manus.ai/docs/api-reference/create-task) |
117 | 121 |
|
118 | 122 | ```php |
| 123 | +use Tigusigalpa\ManusAI\Helpers\AgentProfile; |
| 124 | + |
119 | 125 | $task = $client->createTask('Your task prompt here', [ |
120 | | - 'agentProfile' => 'manus-1.5', // or 'manus-1.5-lite' |
121 | | - 'taskMode' => 'agent', // 'chat', 'adaptive', or 'agent' |
| 126 | + 'agentProfile' => AgentProfile::MANUS_1_5, // or AgentProfile::MANUS_1_5_LITE |
| 127 | + 'taskMode' => 'agent', // 'chat', 'adaptive', or 'agent' |
122 | 128 | 'locale' => 'en-US', |
123 | 129 | 'hideInTaskList' => false, |
124 | 130 | 'createShareableLink' => true, |
125 | 131 | ]); |
126 | 132 | ``` |
127 | 133 |
|
| 134 | +**Available Agent Profiles:** |
| 135 | +- `AgentProfile::MANUS_1_5` - Latest and most capable model (recommended) |
| 136 | +- `AgentProfile::MANUS_1_5_LITE` - Faster, lightweight version |
| 137 | +- `AgentProfile::SPEED` - ⚠️ Deprecated, use `MANUS_1_5_LITE` instead |
| 138 | +- `AgentProfile::QUALITY` - ⚠️ Deprecated, use `MANUS_1_5` instead |
| 139 | + |
| 140 | +```php |
| 141 | +// Or use string values directly |
| 142 | +$task = $client->createTask('Your prompt', [ |
| 143 | + 'agentProfile' => 'manus-1.5', |
| 144 | +]); |
| 145 | +``` |
| 146 | + |
128 | 147 | #### Get Task Details |
129 | 148 |
|
130 | 149 | [API Docs: Get Task](https://open.manus.ai/docs/api-reference/get-task) |
@@ -403,6 +422,16 @@ php artisan manus-ai:task delete --id=task_123 |
403 | 422 | - `TaskAttachment::fromBase64(string $data, string $mimeType): array` |
404 | 423 | - `TaskAttachment::fromFilePath(string $path): array` |
405 | 424 |
|
| 425 | +#### AgentProfile |
| 426 | +- `AgentProfile::MANUS_1_5` - Latest model (recommended) |
| 427 | +- `AgentProfile::MANUS_1_5_LITE` - Lightweight version |
| 428 | +- `AgentProfile::SPEED` - Deprecated |
| 429 | +- `AgentProfile::QUALITY` - Deprecated |
| 430 | +- `AgentProfile::all(): array` - Get all profiles |
| 431 | +- `AgentProfile::recommended(): array` - Get recommended profiles |
| 432 | +- `AgentProfile::isValid(string $profile): bool` |
| 433 | +- `AgentProfile::isDeprecated(string $profile): bool` |
| 434 | + |
406 | 435 | #### WebhookHandler |
407 | 436 | - `WebhookHandler::parsePayload(string $json): array` |
408 | 437 | - `WebhookHandler::isTaskCreated(array $payload): bool` |
|
0 commit comments