Quick Start¶
Get AgentX running and make your first API calls.
Start the Stack¶
This starts Neo4j, PostgreSQL, Redis, the Django API on port 12319, and the Tauri desktop app. All support hot reload.
For API-only development:
Health Check¶
Verify the API is running:
Include database status:
Chat (Simple Completion)¶
Send a message and get a response:
curl -X POST http://localhost:12319/api/agent/chat \
-H "Content-Type: application/json" \
-d '{
"message": "What is the capital of France?",
"model": "llama3.2"
}'
{
"status": "success",
"response": "The capital of France is Paris.",
"session_id": "abc123",
"model": "llama3.2"
}
Streaming Chat¶
Stream responses via Server-Sent Events:
curl -N -X POST http://localhost:12319/api/agent/chat/stream \
-H "Content-Type: application/json" \
-d '{
"message": "Explain quantum computing briefly",
"model": "llama3.2"
}'
Events arrive as SSE:
event: start
data: {"task_id": "t_abc123", "model": "llama3.2"}
event: chunk
data: {"content": "Quantum computing uses "}
event: chunk
data: {"content": "quantum mechanical phenomena..."}
event: done
data: {"task_id": "t_abc123", "total_time_ms": 1423.5, "session_id": "s_def456"}
Session Continuity¶
Pass session_id to maintain conversation context:
curl -X POST http://localhost:12319/api/agent/chat \
-H "Content-Type: application/json" \
-d '{
"message": "What about its population?",
"session_id": "abc123"
}'
Translation¶
Detect Language¶
curl -X POST http://localhost:12319/api/tools/language-detect-20 \
-H "Content-Type: application/json" \
-d '{"text": "Bonjour le monde"}'
Translate Text¶
curl -X POST http://localhost:12319/api/tools/translate \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, world!",
"targetLanguage": "fra_Latn"
}'
{
"status": "success",
"translated_text": "Bonjour le monde!",
"source_language": "eng_Latn",
"target_language": "fra_Latn"
}
Target languages use NLLB-200 codes (e.g., fra_Latn, deu_Latn, spa_Latn). See Translation for the full language code reference.
MCP Tools¶
Connect a Server¶
curl -X POST http://localhost:12319/api/mcp/connect \
-H "Content-Type: application/json" \
-d '{"server": "filesystem"}'
Connect all configured servers:
curl -X POST http://localhost:12319/api/mcp/connect \
-H "Content-Type: application/json" \
-d '{"all": true}'
List Available Tools¶
{
"status": "success",
"tools": [
{
"name": "read_file",
"description": "Read the contents of a file",
"server": "filesystem"
}
]
}
Once tools are connected, the agent can use them automatically during chat. See MCP for server configuration.
Prompt Profiles¶
List Profiles¶
Use a Profile in Chat¶
curl -X POST http://localhost:12319/api/agent/chat \
-H "Content-Type: application/json" \
-d '{
"message": "Help me write a poem",
"profile_id": "creative"
}'
See Prompts for profile management.
Memory¶
Recall Memories¶
curl -X POST http://localhost:12319/api/memory/recall \
-H "Content-Type: application/json" \
-d '{"query": "user preferences", "top_k": 5}'
View Memory Stats¶
Memory is automatically populated during chat when enable_memory is true (default). See Memory for the full memory system reference.
Database Access¶
task db:shell:postgres # psql shell
task db:shell:redis # redis-cli
task db:shell:neo4j # cypher-shell
Neo4j web browser: http://localhost:7474
Next Steps¶
- Configuration — Environment variables and config files
- API Endpoints — Full API reference
- Architecture Overview — System design
- Chat — Chat modes, streaming, and tool-use loops