Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Tool examples cover the surfaces a developer reaches for when giving an agent things to do. Sources under examples/tools/.
NameScenarioSource
tools_schemaBuild a get_weather tool with typed args; agent dispatches it for two cities in one turn.src
tools_calling_agentMulti-tool agent — Calculator + WordCount, dispatched as the user asks each.src
tools_orchestratorFan out three slow price-fetch tools in parallel, fold to the cheapest. No agent loop.src
tools_stateful_httpTranslator tool that reuses one connection pool across calls — the shape of any external-service tool.src

How to run

COGNIS_PROVIDER=ollama COGNIS_OLLAMA_MODEL=llama3.1 \
  cargo run -p cognis-examples --example tools_schema

Pick a starting point

  • Building your first typed tool? tools_schemaSchemaBasedTool with a typed Params struct.
  • Calling external services? tools_stateful_http shows the shared-client pattern.
  • No agent loop, just a DAG of calls? tools_orchestrator.

See also

Tools guide

Tool, SchemaBasedTool, validators, ToolOrchestrator.

Production → Security

Deny-lists, SSRF protection, sandboxing.

Patterns → HITL approval

Approval-gated tool calls.