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
+5-3
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ pip install -U agentserve
44
44
45
45
AgentServe allows you to easily wrap your agent code in a FastAPI application and expose it via REST endpoints. Below are the steps to integrate AgentServe into your project.
46
46
47
-
### 1.Install AgentServe
47
+
### 1.Install AgentServe
48
48
49
49
First, install the `agentserve` package using pip:
50
50
@@ -57,7 +57,7 @@ Make sure your virtual environment is activated if you're using one.
57
57
58
58
### 2. Create or Update Your Agent
59
59
60
-
Within your entry point file (e.g. `main.py`), create an agent function that will be used to process tasks.
60
+
Within your entry point file (e.g. `main.py`) we will import `agentserve` and create an app instance, then decorate an agent function with `@app.agent`. Finally, we will call `app.run()` to start the server.
61
61
62
62
The agent function should take a single argument, `task_data`, which will be a dictionary of data prequired by your agent.
63
63
@@ -66,6 +66,7 @@ The agent function should take a single argument, `task_data`, which will be a d
66
66
```python
67
67
# main.py
68
68
import agentserve
69
+
from openai import OpenAI
69
70
70
71
app = agentserve.app()
71
72
@@ -84,7 +85,7 @@ if __name__ == "__main__":
84
85
```
85
86
86
87
In this example:
87
-
- We import agentserve and create an app instance using agentserve.app().
88
+
- We import agentserve and create an app instance using `agentserve.app()`.
88
89
- We define our agent function `my_agent` and decorate it with `@app.agent`.
89
90
- Within the agent function, we implement our agent's logic.
90
91
- We call `app.run()` to start the server.
@@ -249,6 +250,7 @@ INSTRUCTIONS COMING SOON
249
250
250
251
- [ ] Add support for streaming responses
251
252
- [ ] Add easy instructions for more hosting options (GCP, Azure, AWS, etc.)
253
+
- [ ] Add support for external storage for task results
0 commit comments