This guide focuses on running the code that is already in this repo.
- Python 3.10 to 3.12
- Poetry
- Credentials for the model provider you choose
- Optional: Redis if you want the configured cache backend from
config/model.json - Optional: ONNX build dependencies if you want local embedding assets
poetry installOptional ONNX assets:
poetry install --with onnx
python onnx_assets/build.pyBy default, AnyMind looks for model config in these locations, in order:
AM_MODEL_CONFIG./model.json./config/model.jsonrepo-root/config/model.json~/.config/anymind/model.json
MCP server config follows the same pattern, using AM_MCP_CONFIG and mcp_servers.json.
The repo includes example model configs:
- ../config/model.json
- ../config/model.openai.json
- ../config/model.bedrock.json
- ../config/model.ollama.json
Example environment setup:
export AM_MODEL_CONFIG=$PWD/config/model.openai.json
export AM_MCP_CONFIG=$PWD/config/mcp_servers.jsonconfig/mcp_servers.json already includes the bundled local_tools MCP server, so no separate local-tools process is required.
If you want internet_search to work in the bundled local_tools MCP server, configure both upstream providers:
- Kagi: set
KAGI_API_KEY, or setsearch.kagi_api_keyin the model config so the session factory exports it into the process environment - Scrapfly: set
SCRAPFLY_API_KEY, or provideSCRAPFLY_API_KEY_SECRET_ARN
Example:
export KAGI_API_KEY=your_kagi_key
export SCRAPFLY_API_KEY=your_scrapfly_keyImportant: without these values, the bundled local MCP server does not register internet_search. current_time and pdf_extract_text do not depend on those search credentials.
Research-oriented workflow:
poetry run anymind --agent research_agent -q "Compare recent CPI trends across G7 nations"Interactive CLI:
poetry run anymind --agent research_agentSOP workflow from a file:
poetry run anymind --agent sop_agent -q "@/absolute/path/to/sop.json"You can override model settings at runtime:
poetry run anymind \
--agent research_agent \
--provider openai \
--model gpt-5.1 \
--tools-policy planner \
-q "Summarize the latest public SEC filing for Company X"Start the FastAPI service:
poetry run anymind serve --host 0.0.0.0 --port 8000Important endpoints:
GET /healthPOST /agents/runPOST /jobsGET /jobs/{job_id}POST /jobs/{job_id}/pausePOST /jobs/{job_id}/resumePOST /jobs/{job_id}/cancel
Example synchronous request:
curl -X POST http://127.0.0.1:8000/agents/run \
-H 'content-type: application/json' \
-d '{
"message": "Compare recent CPI trends across G7 nations",
"agent": "research_agent"
}'Run the test suite:
poetry run pytest -vThe repository already includes targeted tests for config loading, tool policy, evidence handling, usage tracking, caching, and MCP registry behavior.