You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,13 @@ graph LR
30
30
-**Streaming + tool calls** — all providers support streaming with assembled tool call deltas
31
31
-**Structured output** — extract typed data from LLMs via JSON mode (OpenAI) or tool-use trick (Anthropic)
32
32
-**Image input** — send images to vision models via base64, URL, or file path (auto-converts between provider formats; URLs pre-downloaded for providers that don't support them natively)
33
-
-**Bundled agents** — `FileAgent`, `WebAgent`, `CodeAgent`ready to use out of the box
33
+
-**Bundled agents** — `FileAgent`, `WebAgent`, `CodeAgent`for quick prototyping *(deprecated — use `AbstractAgent` with toolkits for production)*
34
34
-**Composable toolkits** — filesystem, web, shell, and memory toolkits that snap onto any agent
return 'You are a helpful file assistant. Read and summarize files when asked.';
100
+
}
101
+
102
+
public function name(): string
103
+
{
104
+
return 'FileAgent';
105
+
}
106
+
}
92
107
108
+
$provider = new OllamaProvider(model: 'llama3.2');
109
+
$agent = new MyFileAgent($provider, getcwd());
93
110
$output = $agent->run(new UserMessage('Summarize the README.md file.'));
94
111
95
112
echo $output->content . "\n";
96
113
```
97
114
98
115
> Make sure Ollama is running: `ollama serve` and a model is pulled: `ollama pull llama3.2`
99
116
100
-
## Bundled Agents
117
+
## Bundled Agents (Deprecated)
118
+
119
+
> **Note:** Bundled agents are deprecated and will be removed in 1.0. Use `AbstractAgent` with composable toolkits instead (see [Creating Custom Agents](#creating-custom-agents)).
Copy file name to clipboardExpand all lines: docs/AGENTS.md
+26-23Lines changed: 26 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,39 +102,42 @@ flowchart TD
102
102
LOOP --> NOTIFY_DONE[notify: agent.done]
103
103
```
104
104
105
-
## Built-in Agents
105
+
## Built-in Agents (Deprecated)
106
106
107
-
### FileAgent
107
+
> **Deprecated.** `FileAgent`, `WebAgent`, and `CodeAgent` will be removed in 1.0. Use `AbstractAgent` with explicit toolkits instead — this gives you full control over which tools are available.
108
108
109
-
Pre-loaded with `FilesystemToolkit`. Good for file manipulation tasks.
Copy file name to clipboardExpand all lines: docs/MEMORY.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Memory
2
2
3
+
> **Deprecated.**`FileMemory`, `MemoryToolkit`, and the `MemoryInterface` in php-agents will be removed in 1.0. For production use, implement a database-backed memory store (e.g. Coqui's SQLite-backed `MemoryStore`). The vector store layer (`VectorStoreInterface`, `InMemoryVectorStore`, embedding providers) is **not** deprecated.
4
+
3
5
php-agents provides a layered memory system: simple key-value storage, persistent file-backed memory, and vector similarity search for semantic retrieval.
4
6
5
7
## Architecture
@@ -58,7 +60,9 @@ interface MemoryInterface
58
60
}
59
61
```
60
62
61
-
## FileMemory
63
+
## FileMemory (Deprecated)
64
+
65
+
> **Deprecated.** Use a database-backed implementation instead. Will be removed in 1.0.
62
66
63
67
Persists memories to a Markdown file. Each entry is a third-level heading with the key as the title and the value as the body:
64
68
@@ -117,7 +121,9 @@ sequenceDiagram
117
121
118
122
`FileMemory::search()` performs simple substring matching on keys and values. For semantic search, use a vector store.
119
123
120
-
## MemoryToolkit
124
+
## MemoryToolkit (Deprecated)
125
+
126
+
> **Deprecated.** Use a database-backed memory toolkit instead. Will be removed in 1.0.
121
127
122
128
Exposes memory operations as tools the agent can use:
Copy file name to clipboardExpand all lines: docs/PROVIDERS.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,6 +469,61 @@ Both URL and base64 data URI images are supported.
469
469
|----------|---------|
470
470
|`MISTRAL_API_KEY`|`MistralProvider`|
471
471
472
+
## Shared Provider Utilities
473
+
474
+
### PSR-3 Logging
475
+
476
+
All providers accept an optional `Psr\Log\LoggerInterface` via their constructor. When provided, errors in non-critical paths (model listing, health checks, image downloads) are logged instead of silently swallowed:
0 commit comments