alfred-agent/README.md

1.2 KiB

Alfred Agent

The autonomous AI agent runtime for Alfred Linux and Alfred IDE.

Architecture

  • Multi-provider support: Anthropic Claude, OpenAI GPT, Groq (via OpenAI-compatible adapter)
  • 14 built-in tools: File operations, web search, shell execution, code analysis
  • Session persistence: Full conversation history stored to disk
  • 7-section system prompt: Structured reasoning with identity, capabilities, safety guardrails

Source Files

File Purpose
src/providers.js Multi-LLM provider abstraction (Anthropic, OpenAI, Groq)
src/tools.js 14 tool definitions — file I/O, search, shell, analysis
src/prompt.js 7-section system prompt builder
src/session.js Conversation session manager with disk persistence
src/agent.js Core agent loop — tool calling, reasoning, response synthesis
src/cli.js Interactive CLI interface
src/index.js HTTP server (port 3102) with health check and message endpoints

Running

# CLI mode
OPENAI_API_KEY=... node src/cli.js --provider openai --model gpt-4o-mini -m "hello"

# Server mode (PM2)
pm2 start src/index.js --name alfred-agent
# Health: curl http://127.0.0.1:3102/health

License

AGPL-3.0 — GoSiteMe Inc.