@aeo-kit/agent
v0.1.2
Published
AEO consumer — reads .aeo artifacts and emits agent-ready tool definitions (OpenAI, MCP).
Readme
@aeo-kit/agent
AEO consumer — reads .aeo artifacts and emits agent-ready tool definitions for OpenAI function calling and MCP.
Install
npm install @aeo-kit/agentCLI usage
# Generate OpenAI function-calling tool definitions
npx aeo-agent openai --aeo ./.aeo --out ./tools.openai.json
# Generate MCP tool definitions
npx aeo-agent mcp --aeo ./.aeo --out ./tools.mcp.json
# Validate .aeo artifacts (consumer-side safety checks)
npx aeo-agent validate --aeo ./.aeoOutput goes to stdout when --out is omitted or set to -.
Programmatic usage
import { loadAEO, toOpenAITools, toMCPTools, validateAEOConsumerInput } from "@aeo-kit/agent";
const aeo = await loadAEO("./.aeo");
// OpenAI function calling
const openaiTools = toOpenAITools(aeo);
// MCP
const mcpTools = toMCPTools(aeo);
// Consumer validation
const result = validateAEOConsumerInput(aeo);
if (!result.valid) {
console.error(result.findings);
}Output format (OpenAI)
Each AEO tool becomes an OpenAI function-calling tool with AEO metadata in x-aeo:
{
"type": "function",
"function": {
"name": "list-pets",
"description": "List all pets",
"parameters": { "type": "object", "properties": { "limit": { "type": "integer" } } }
},
"x-aeo": {
"method": "GET",
"path": "/pets",
"intent": { "intent": "read", "source": "derived" },
"trust": { "required": false, "source": "explicit" }
}
}License
Apache-2.0
