Agentic Tools

Agentic Tools

IWE provides CLI commands specifically designed for AI agents and LLM integrations. These tools enable programmatic access to your knowledge graph with structured output formats and relationship-aware retrieval.

Why agentic tools?

AI agents need efficient ways to:

  • Discover relevant documents without knowing exact names
  • Retrieve content with appropriate context and relationships
  • Navigate the knowledge graph following connections
  • Process output in structured formats (JSON, keys)

Available commands

Typical agent workflow

iwe find "authentication" --roots -f keys
iwe retrieve -k authentication -d 2 -c 1
iwe retrieve -k login-flow -e authentication
  1. Find entry points using iwe find with fuzzy search
  2. Retrieve content with appropriate depth and context
  3. Follow relationships by retrieving linked documents
  4. Exclude known content to avoid duplication

Output formats

Both commands support multiple output formats:

FormatFlagUse case
Markdown-f markdownHuman-readable output with full content
Keys-f keysPiping to other commands
JSON-f jsonProgrammatic processing and parsing

Integration examples

Claude Code / MCP integration

iwe find --roots -f json | jq '.results[].key'

iwe retrieve -k "$KEY" -d 1 -c 1

Building context for LLMs

iwe find "$QUERY" -l 5 -f keys | while read key; do
  iwe retrieve -k "$key" -d 0 -c 0 --dry-run
done

iwe retrieve -k "$SELECTED_KEY" -d 2 -c 1