The anymind console script is backed by ../src/anymind/cli/main.py.
Important options:
--agent--config/-c--model--provider--temperature--tools-policy--tools-enabled/--no-tools--thread-id--query/-q--log-level
Without --query, the CLI runs in interactive mode.
The FastAPI app lives in ../src/anymind/api/app.py.
| Endpoint | Purpose |
|---|---|
GET /health |
Liveness check. |
POST /agents/run |
Synchronous agent execution. |
POST /jobs |
Async execution backed by JobManager. |
GET /jobs/{job_id} |
Job status and result retrieval. |
POST /jobs/{job_id}/pause |
Pause a running job. |
POST /jobs/{job_id}/resume |
Resume a paused job. |
POST /jobs/{job_id}/cancel |
Cancel a job. |
| Agent | Implementation | Notes |
|---|---|---|
research_agent |
research_director_agent.py |
Delegates probe questions to other runtimes and synthesizes the final answer. |
sop_agent |
sop_agent.py |
Expects a JSON SOP payload or @path to a JSON file. |
aiot_agent |
aiot_agent.py |
Brain/worker iterative loop with validated JSON checkpoints. |
giot_agent |
giot_agent.py |
Parallel agent loop with temperature spread and facilitator-style convergence. |
agot_agent |
agot_agent.py |
Adaptive graph planning and worker-pool execution. |
got_agent |
got_agent.py |
Graph-of-thought search with reflection and verification. |
Search order:
AM_MODEL_CONFIG./model.json./config/model.jsonrepo-root/config/model.json~/.config/anymind/model.json
Important fields in ModelConfig:
modelmodel_providermodel_parametersthread_idtools_enabledtools_policybudget_tokenssearchstate_dircheckpointcache- agent-specific sections such as
aiot,giot,agot,got,sop, andresearch_director
Search order:
AM_MCP_CONFIG./mcp_servers.json./config/mcp_servers.jsonrepo-root/config/mcp_servers.json~/.config/anymind/mcp_servers.json
The MCP registry resolves relative paths against the working directory used to build the session.
| Policy | Behavior |
|---|---|
auto |
Expose all configured tools. |
planner |
Ask the model to choose a subset of tools for the current request. |
confirm |
Expose all tools, but require a terminal confirmation before execution. |
never |
Disable tool use. |
When the model provider is ollama and the config says auto, the session factory upgrades the policy to planner.
The bundled local MCP server is ../src/anymind/tools/mcp_local_tools.py. It exposes:
current_timepdf_extract_textinternet_searchwhen Kagi and Scrapfly credentials are available
These can be used through the local MCP registry just like external servers.
Credential requirements:
internet_searchis only registered when Kagi plus Scrapfly credentials are availablecurrent_timedoes not require external API credentialspdf_extract_textdoes not require Kagi or Scrapfly credentials
- Checkpoints default to SQLite through
AsyncSqliteSaverwhen available. - If the SQLite checkpoint dependency is unavailable, the code falls back to in-memory checkpoints.
checkpoint.backend=redisis not currently implemented and raises an error.- Usage data can be stored in Redis via
ANYMIND_USAGE_REDIS_URL. - Tool-result caching can wrap MCP calls when
cache.redis_urlis set in the model config.
AM_MODEL_CONFIGAM_MCP_CONFIGAM_STATE_DIR
ANYMIND_LOG_PATHANYMIND_LOG_DIRANYMIND_LOG_LEVELANYMIND_LOG_RUN_IDANYMIND_EVIDENCE_MAX_CHARSANYMIND_EVIDENCE_ITEM_MAX_CHARS
These may be forwarded into MCP server environments by the registry:
KAGI_API_KEYKAGI_API_ENDPOINTSCRAPFLY_API_KEYSCRAPFLY_API_KEY_SECRET_ARNSCRAPFLY_COUNTRYSCRAPFLY_FORMATAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_SESSION_TOKENAWS_PROFILEAWS_REGIONAWS_DEFAULT_REGIONONNX_MODEL_PATHONNX_TOKENIZER_PATHONNX_MAX_LENGTHONNX_EMBED_BATCH_SIZEPDF_ONNX_MODEL_PATHPDF_ONNX_TOKENIZER_PATHPDF_ONNX_MAX_LENGTH
For adapters of this repo, the minimum search-related setup is:
KAGI_API_KEYorsearch.kagi_api_keyin the model configSCRAPFLY_API_KEYorSCRAPFLY_API_KEY_SECRET_ARN
Without those values, internet_search is not registered by the bundled local MCP server.