How oracle/agent-spec works
AgentSpec is a portable, framework-agnostic specification and SDK for describing agents and structured flows, with Python and TypeScript implementations. The main workflow is to define components and their properties, serialize or deserialize configurations, then load them through a runtime adapter for execution in an agent framework. The repository also includes evaluation, tracing, data-source, and integration capabilities. Relationships are limited to those supported by the README or the supplied source index; unsampled subsystem internals are not inferred.
Main entry points: __init__.py Python SDK · index.ts TypeScript SDK · component.py Components · llmconfig.py LLM configs
Components 21
Specification model
- Python SDK
pyagentspec/src/pyagentspec/__init__.py - TypeScript SDK
tsagentspec/src/index.ts - Components
pyagentspec/src/pyagentspec/component.py - Typed properties
pyagentspec/src/pyagentspec/property.py - Agents
pyagentspec/src/pyagentspec/agent.py - Structured flows
pyagentspec/src/pyagentspec/flows/flow.py - LLM configs
pyagentspec/src/pyagentspec/llms/llmconfig.py - Tools and MCP
pyagentspec/src/pyagentspec/tools/tool.py - JSON/YAML serialization
pyagentspec/src/pyagentspec/serialization/serializer.py - Datastores
pyagentspec/src/pyagentspec/datastores/datastore.py - Message transforms
pyagentspec/src/pyagentspec/transforms/transforms.py
Runtime adapters
- Framework adapters
pyagentspec/src/pyagentspec/adapters - LangGraph adapter
pyagentspec/src/pyagentspec/adapters/langgraph/_langgraphconverter.py - WayFlow adapter
pyagentspec/src/pyagentspec/adapters/wayflow
Evaluation and observability
- Evaluation
pyagentspec/src/pyagentspec/evaluation/evaluator/evaluator.py - Metrics and judges
pyagentspec/src/pyagentspec/evaluation/metrics/metrics.py - Tracing
pyagentspec/src/pyagentspec/tracing/trace.py
External integrations
- LLM providers
- MCP services
Other components
- SDK user
- Agent frameworks
Connections 23
- SDK user → Python SDK: defines configurations
README.md - SDK user → TypeScript SDK: defines configurations
tsagentspec/src/index.ts - Python SDK → Components: builds abstractions
README.md - TypeScript SDK → Components: builds abstractions
tsagentspec/src/index.ts - Components → Typed properties: uses properties
pyagentspec/src/pyagentspec/component.py - SDK user → Agents: creates agents
README.md - SDK user → Structured flows: creates flows
README.md - Agents → LLM configs: configures with
README.md - Python SDK → JSON/YAML serialization: serializes components
README.md - TypeScript SDK → JSON/YAML serialization: serializes components
tsagentspec/src/index.ts - SDK user → Tools and MCP: composes tools
- SDK user → Datastores: configures data access
- SDK user → Message transforms: configures transforms
- SDK user → Framework adapters: selects adapter
README.md - Framework adapters → Agent frameworks: transforms for execution
README.md - LangGraph adapter → Agent frameworks: compiles configurations
- WayFlow adapter → Agent frameworks: loads configurations
README.md - SDK user → Evaluation: evaluates agents
- Evaluation → Metrics and judges: computes metrics
- Metrics and judges → LLM configs: uses judge model
- SDK user → Tracing: observes execution
- LLM configs → LLM providers: configures providers
- Tools and MCP → MCP services: connects via MCP