A2 Agent

A self-hosted, agentic task platform designed for seamless integration.

Ask me Anything

A2 Agent (CLI) Task Automation

The A2 Command Line Interface (CLI) enables powerful task automation and integration with the A2 Agentic Coding Platform. It provides both interactive and non-interactive modes for seamless workflow automation.

Key Features

Getting Started

To use the A2 CLI, ensure you have it installed and configured. You can run tasks in two primary modes:

Interactive Mode

 # Start an interactive session
a2 interact
                

Task Mode

 # Execute a single task
a2 task "Create a new file named 'hello.md' with content '# Hello Agent'"
                

Background Jobs

For long-running tasks, use the background job functionality:

 # Run a task in the background
a2 task "Analyze entire codebase for security vulnerabilities" --background

# List all jobs
a2 jobs list

# Check specific job status
a2 jobs show [job-id]

# Wait for job completion
a2 jobs wait [job-id]
            

Context Parameters

Pass contextual information to tasks using parameters:

 # Pass context to your task
a2 task "Review this file" --param file=src/main.py --param language=python
            

For comprehensive documentation, visit the CLI Reference Documentation or check out the A2 CLI Guide.

API Documentation

Our API provides full compatibility with OpenAI, Anthropic, and OpenRouter formats. Access comprehensive documentation for all available endpoints:

OpenAI-Compatible Examples

Use the following example to make requests to our OpenAI-compatible endpoint:

curl -X POST https://a2-agent.k42.ventures/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-coder-v2",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello, how are you?"}
    ],
    "temperature": 0.7
  }'

Anthropic-Compatible Examples

Use the following example to make requests to our Anthropic-compatible endpoint:

curl -X POST https://a2-agent.k42.ventures/v1/messages \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-coder-v2",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ]
  }'

OpenRouter-Compatible Examples

Use the following example to make requests to our OpenRouter-compatible endpoint:

curl -X POST https://a2-agent.k42.ventures/openrouter/chat/completions \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-coder-v2",
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ]
  }'

JavaScript/Node.js Example

import axios from 'axios';

const response = await axios.post('https://a2-agent.k42.ventures/v1/chat/completions', {
  model: 'deepseek-coder-v2',
  messages: [
    { role: 'user', content: 'Hello, how are you?' }
  ]
}, {
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

console.log(response.data);

Python Example

import requests

response = requests.post(
    'https://a2-agent.k42.ventures/v1/chat/completions',
    headers={
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'Content-Type': 'application/json'
    },
    json={
        'model': 'deepseek-coder-v2',
        'messages': [
            {'role': 'user', 'content': 'Hello, how are you?'}
        ]
    }
)

print(response.json())

Verify Examples

You can test these example requests directly in our API tester above. Just select the appropriate endpoint and enter your API token to execute the requests.

Quick Test Examples:

For detailed information about all endpoints and their usage, visit our comprehensive API documentation.

API Tester

⚠️ API Key Required

To test and use the live API, you need an API key. Request your API key by email to: a2-agent-api@k42.ventures

Note: Without a valid API key, API requests will return an authentication error.

Quick Test Examples

API Status

Checking connection...

πŸ€– Intelligent Agent

Powered by advanced language models to understand and execute complex development tasks through a message queue system.

πŸ”§ Developer Tools

Integrated file I/O, shell execution, and other essential tools to complete complex development tasks autonomously.

🌐 API Compatible

Full compatibility with OpenAI, Anthropic, and OpenRouter API formats for seamless integration with existing tools.

Ready to Enhance Your Development Workflow?

Get started with A2 Agent today and experience the power of autonomous coding assistance.

Contact us, let's talk.