-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the solution you'd like
In order to build an agent with filesystem ability, agent needs to have some basic tools: ls, read, write, move, grep, glob...
Acontext supports basic file storage using linux file path, whose sdk methods are covered.
But those sdk methods can't be directly used by agent, we need to export those operations with Tool schema(OpenAI or Anthropic)
We should have the built-in tool-schema in SDK so that developers can directly use them in their agents.
We shall support basic LLM SDK like openai and anthropic sdk first, then support some agent frameworks like agno, openai agent sdk and vercel/ai-sdk
Proposed API/Interface
If applicable, describe how you envision the API or interface would look:
from acontext.agent import DISK_TOOLS
# ...
session_ctx = DISK_TOOLS.form_context(acontext_client, disk_id)
response = openai_client.chat.completions.create(
messages=messages
tools=DISK_TOOLS.to_openai_tool_schema()
)
# ...
tool_responses = []
for tool in response.tool_calls:
name = tool.function.name
arguments = tool.function.arguments
if not DISK_TOOLS.tool_exists(name):
continue
r = DISK_TOOLS.execute_tool(session_ctx, name, arguments)
tool_responses.append(
{
"role": "tool",
"tool_call_id": tool.id,
"content": r,
}
)Component/Area
Which part of Acontext would this feature affect?
- Client SDK (Python)
- Client SDK (TypeScript)
- Core Service (Python)
- API Server (Go)
- UI/Dashboard (Next.js)
- CLI Tool
- Documentation
- Other (please specify)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request