Observed since 20 Oct, 21:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
afm-langchain
AFM LangChain execution backend
LangChain execution backend for Agent-Flavored Markdown (AFM) agents.
This package implements the AgentRunner protocol from afm-core, providing LLM orchestration using the LangChain framework.
This package is typically installed as part of afm-cli. For LangChain-specific use:
pip install afm-langchain
model:
provider: openai
name: gpt-4o # or other OpenAI models
Requires: OPENAI_API_KEY environment variable
model:
provider: anthropic
name: claude-sonnet-4-5 # or other Claude models
Requires: ANTHROPIC_API_KEY environment variable
This project uses uv for dependency management.
# Clone the repository
git clone https://github.com/wso2/reference-implementations-afm.git
cd python-interpreter
# Install dependencies
uv sync
# Activate the virtual environment
source .venv/bin/activate
# Run afm-langchain tests
uv run pytest packages/afm-langchain/tests/
# Run with coverage
uv run pytest packages/afm-langchain/tests/ --cov=afm_langchain
# Format code
uv run ruff format
# Lint code
uv run ruff check
packages/afm-langchain/src/afm_langchain/
├── __init__.py
├── backend.py # LangChainRunner implementation
├── model_factory.py # LLM provider factory
├── mcp_manager.py # MCP tool management
└── tools_adapter.py # Tool calling adapter
The LangChain backend is automatically registered and used when you run an AFM agent:
from afm.runner import get_runner
# Get the LangChain runner
runner = get_runner("langchain")
# Run an agent
result = await runner.run(agent, user_input)
For comprehensive documentation, see the project README.
Apache-2.0
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
afm-coreEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | afm-core<0.4.0,>=0.3.0 | runtime |
langchainEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | langchain>=1.2.8 | runtime |
langchain-openaiEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | langchain-openai>=1.1.7 | runtime |
langchain-anthropicEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | langchain-anthropic>=1.3.1 | runtime |
mcpEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | mcp>=1.26.0 | runtime |
langchain-mcp-adaptersEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.11",
"evaluation": "NOT_EVALUATED"
} | langchain-mcp-adapters>=0.2.1 | runtime |
bdist_wheel · 13.43 KB · Python py3
sdist · 8.67 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 21:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:95a5283cdf4c82581a0fbd585e95c8bbc74e1d96ebff2ad7ba259006d40e0107