Developer Hub

Technical documentation for developers integrating with, extending, or building on AgenticFlow.

API Reference

Complete REST API documentation for AgenticFlow.

What you can do:

  • Create and manage agents programmatically

  • Execute workflows via API

  • Deploy and control workforce teams

  • Manage data and knowledge bases

  • Access platform resources

  • Monitor and track usage

API key generation, JWT tokens, OAuth flows, and security best practices.

Core Resources

Receive real-time events from AgenticFlow:

  • Agent conversation events

  • Workflow execution status

  • Workforce team updates

  • System notifications

API quotas, throttling, and best practices for high-volume usage.

Ready-to-use code samples in multiple languages:

  • Python

  • JavaScript/TypeScript

  • cURL

  • Go

  • Ruby


SDKs & Libraries

Official SDKs

  • Python SDK - Full-featured Python library

  • JavaScript/TypeScript SDK - Node.js and browser support

  • Go SDK - For Go applications

  • Ruby SDK - Ruby integration

Community Libraries

  • Community-maintained libraries and wrappers

  • Language-specific helpers

  • Framework integrations


Extensions & Plugins

Custom Nodes

  • Coming soon: custom node development guides and publishing steps.

Plugins

  • Coming soon: plugin architecture and marketplace guidelines.

Themes

  • Coming soon: UI customization and branding guidance.


Platform Architecture

Understanding how AgenticFlow works:

  • System architecture

  • Component interaction

  • Data flow

  • Security model

Detailed technical information:

  • Infrastructure

  • Scalability

  • Performance

  • Security measures


Integration Patterns

Common Use Cases

Embed Agents in Your Application

const agent = await agenticflow.agents.create({
  name: "Support Assistant",
  systemPrompt: "You are a helpful support agent...",
  model: "claude-3-5-sonnet"
});

const response = await agent.chat("How do I reset my password?");

Execute Workflows Programmatically

workflow = client.workflows.execute(
    workflow_id="workflow_123",
    inputs={"email": "[email protected]"}
)

result = workflow.wait_for_completion()

Deploy Multi-Agent Teams

const team = await client.workforce.deploy({
  name: "Customer Service Team",
  agents: [triageAgent, techAgent, billingAgent],
  router: routingLogic
});

const result = await team.process(customerInquiry);

Development Tools

Local Development

  • Development environment setup

  • Local testing tools

  • Debugging techniques

  • Hot reloading

Testing

  • Unit testing agents and workflows

  • Integration testing

  • End-to-end testing

  • Performance testing

CI/CD Integration

  • Automated deployment

  • Version control

  • Testing pipelines

  • Rollback strategies


Best Practices

API Usage

  • Authentication: Always use secure API key storage

  • Error Handling: Implement proper retry logic and error handling

  • Rate Limiting: Respect rate limits and implement backoff

  • Versioning: Use API versioning for stability

  • Monitoring: Track API usage and performance

Performance Optimization

  • Caching: Cache responses when appropriate

  • Batch Operations: Use batch endpoints for bulk operations

  • Async Processing: Leverage webhooks for long-running tasks

  • Connection Pooling: Reuse connections where possible

Security

  • API Keys: Rotate regularly, never commit to version control

  • Permissions: Use principle of least privilege

  • Data Encryption: Always use HTTPS

  • Input Validation: Validate all inputs

  • Output Sanitization: Sanitize outputs to prevent XSS


SDK Examples

Python SDK

from agenticflow import AgenticFlowClient

# Initialize client
client = AgenticFlowClient(api_key="your_api_key")

# Create an agent
agent = client.agents.create(
    name="Research Assistant",
    system_prompt="You are a research assistant specialized in...",
    model="claude-3-5-sonnet",
    knowledge_bases=["kb_123"],
    tools=["google_search", "wikipedia"]
)

# Chat with the agent
response = agent.chat("What are the latest developments in AI?")
print(response.message)

JavaScript SDK

import { AgenticFlowClient } from '@agenticflow/sdk';

// Initialize client
const client = new AgenticFlowClient({
  apiKey: process.env.AGENTICFLOW_API_KEY
});

// Execute workflow
const workflow = await client.workflows.execute({
  workflowId: 'workflow_123',
  inputs: {
    data: 'process this'
  }
});

// Wait for completion
const result = await workflow.waitForCompletion();
console.log(result.outputs);

Webhook Integration

Setting Up Webhooks

// Register webhook endpoint
await client.webhooks.create({
  url: 'https://your-app.com/webhooks/agenticflow',
  events: [
    'agent.conversation.completed',
    'workflow.execution.failed',
    'workforce.team.finished'
  ],
  secret: 'your_webhook_secret'
});

// Handle webhook in your app
app.post('/webhooks/agenticflow', (req, res) => {
  const signature = req.headers['x-agenticflow-signature'];
  const payload = req.body;

  // Verify signature
  if (verifySignature(payload, signature, webhookSecret)) {
    handleEvent(payload);
    res.sendStatus(200);
  } else {
    res.sendStatus(401);
  }
});

GraphQL API

GraphQL Endpoint

AgenticFlow also provides a GraphQL API for more flexible queries.

query {
  agent(id: "agent_123") {
    name
    systemPrompt
    conversations(limit: 10) {
      id
      messages {
        role
        content
      }
    }
  }
}

mutation {
  createWorkflow(input: {
    name: "Data Pipeline"
    nodes: [...]
    connections: [...]
  }) {
    id
    name
  }
}

Error Handling

Common Error Codes

  • 400 Bad Request: Invalid request parameters

  • 401 Unauthorized: Invalid or missing API key

  • 403 Forbidden: Insufficient permissions

  • 404 Not Found: Resource doesn't exist

  • 429 Too Many Requests: Rate limit exceeded

  • 500 Internal Server Error: Server error

  • 503 Service Unavailable: Temporary service issue

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "The provided workflow configuration is invalid",
    "details": {
      "field": "nodes",
      "issue": "Missing required connection"
    }
  }
}

Versioning

API Versions

  • Current Version: v1

  • Deprecated Versions: None yet

  • Version Strategy: Semantic versioning

  • Breaking Changes: 6-month deprecation notice

Specifying Version

curl -H "AgenticFlow-Version: 2024-11-01" \
     -H "Authorization: Bearer $API_KEY" \
     https://api.agenticflow.com/v1/agents

OpenAPI Specification

Download the complete OpenAPI (Swagger) specification:


Support for Developers

Developer Resources

Getting Help



Learn More


Ready to start building? Explore the API Reference →

Last updated

Was this helpful?