Agent Functions Library is designed for the emerging world of AI-driven software development, where autonomous agents need to trigger and compose functions across different languages and platforms. It stands out by offering:
-
Native Agent Integration: Built specifically for AI agents, not adapted after the fact
- Declarative function triggers that agents can easily understand and use
- Built-in metadata and documentation that helps agents make decisions
- Automatic validation and error handling suited for agent interactions
-
Cross-Language Support: Seamlessly work with both Python and JavaScript
- Write functions in either language
- Call Python functions from JavaScript and vice versa
- Unified interface across languages
-
Cloud-Native & Serverless Ready
- AWS Lambda integration out of the box
- FastAPI service for distributed architectures
- Event-driven architecture support
-
Enterprise-Grade Features
- Type safety and validation
- Comprehensive logging
- Plugin system for extensibility
- Workflow composition
- Mathematical and data processing capabilities
pip install agent-functionsnpm install agent-functionsfrom agent_functions import AgentFunction, workflow
@AgentFunction(
category="nlp",
description="Analyze text sentiment",
agent_triggers=["sentiment_analysis_requested"]
)
def analyze_sentiment(text: str) -> dict:
# Your sentiment analysis logic here
return {"score": 0.8}
@workflow
def process_text(text: str):
sentiment = analyze_sentiment(text)
return {"result": sentiment}import { AgentFunction, workflow } from 'agent-functions';
const analyzeSentiment = AgentFunction({
category: 'nlp',
description: 'Analyze text sentiment',
agentTriggers: ['sentiment_analysis_requested']
})(
async function(text) {
// Your sentiment analysis logic here
return { score: 0.8 };
}
);
const processText = workflow(
async function(text) {
const sentiment = await analyzeSentiment(text);
return { result: sentiment };
}
);- Agent-First Design: Built from the ground up for AI agent integration
- Cross-Language Support: Python and JavaScript interoperability
- Cloud-Ready: Serverless and microservices support
- Type-Safe: Strong typing and validation
- Modular: Plugin system for easy extension
- Workflow Composition: Chain functions together
- Rich Analytics: Mathematical and data processing tools included
- AI Agent Systems: Create function libraries that agents can discover and use
- Microservices: Build event-driven services that work across languages
- Data Processing: Compose complex data transformation workflows
- Machine Learning: Create modular ML pipelines
- API Development: Build flexible, agent-friendly APIs
For full documentation, visit our documentation site

We welcome contributions! See CONTRIBUTING.md for guidelines.
MIT License - feel free to use this in your projects!