Skip to content

wso2/reference-implementations-afm

Repository files navigation

AFM Reference Implementations

Reference implementations for Agent-Flavored Markdown (AFM).

Implementations

Ballerina

A Ballerina-based AFM interpreter.

LangChain

A Python-based AFM interpreter using LangChain for agent execution.

Note

Python-based implementations are available via a single CLI tool (pip install afm-cli). LangChain is currently the supported backend, with additional frameworks planned.

Repository Structure

reference-implementations-afm/
├── ballerina-interpreter/          # Ballerina-based AFM interpreter
├── python-interpreter/             # Python-based AFM interpreters (plugin-based)
│   └── packages/afm-langchain/     # LangChain execution backend
└── .github/workflows/              # CI/CD

Contributing

Contributions are welcome!

Adding a New Implementation (New Language or Framework)

To add an interpreter in a new language or framework:

  1. Create a new directory: {language/framework}-{type}/ (e.g., go-interpreter/)
  2. Add a path-filtered workflow in .github/workflows/
  3. Include a README with setup and usage instructions
  4. Follow the AFM Specification for compatibility

Adding a New Python Execution Backend (Plugin)

The Python interpreter uses a plugin-based architecture. New execution backends should be contributed as packages inside python-interpreter/packages/.

To add a new Python backend:

  1. Create a new package under python-interpreter/packages/ and add it to the uv workspace
  2. Implement the AgentRunner protocol from afm-core
  3. Register your backend via the afm.runner entry point in your pyproject.toml:
    [project.entry-points."afm.runner"]
    your-backend = "your_package.module:YourRunnerClass"
  4. Use afm-langchain as a reference implementation
  5. Include a README and tests for your package

License

Apache License 2.0

About

Reference implementations of Agent-Flavored Markdown (AFM)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors