Getting Started with Agent700.ai

This page will help you get started with Agent700.ai. You'll be up and running in a jiffy!

Getting Started with Agent700.ai

This page will help you get started with Agent700.ai. You’ll be up and running in a jiffy!

What is Agent700?

Agent700 is an enterprise-grade AI Agent Management Platform that lets you create, manage, and deploy AI agents across multiple LLM providers with strong security, real-time streaming, and MCP tool integrations.

Key Capabilities

  • AI Agent Management with revisions
  • Real-time streaming via WebSockets
  • MCP (Model Context Protocol) tools & resources
  • JWT auth with refresh rotation & device fingerprinting
  • Org-aware access, billing, and audit logging
  • Document processing & alignment data storage

OpenAPI Spec

Import our OAS to explore and test endpoints interactively.

  • Spec (YAML): memory-bank/api-spec.yaml

Prerequisites

  • Agent700 API base URLs:
    • Production: https://api.agent700.ai
  • An Agent700 account and organization membership
  • A REST client (cURL, Postman, etc.)
  • (Optional) Import the OpenAPI spec into Postman/Swagger UI

Common Headers

HeaderTypeRequiredDescription
Authorizationstring (Bearer)YesJWT access token or App Password token (app_a7_...)
X-Organization-IDstring (uuid)OftenActive organization context for org-aware endpoints
Content-TypestringWhen bodyapplication/json

Replace this screenshot with your Agent700 dashboard image.


1) Authenticate

Authenticate with email/password and receive a JWT access token. Device fingerprinting headers can enhance security.

curl -X POST "$BASE_URL/api/auth/login" \
  -H "Content-Type: application/json" \
  -H "X-Screen-Resolution: 1920x1080" \
  -H "X-Timezone-Offset: -300" \
  -d '{
    "email": "[email protected]",
    "password": "yourPassword"
  }'

Keep the httpOnly refresh token (cookie) the server returns. To refresh:

curl -X POST "$BASE_URL/api/auth/refresh" \
  -H "Cookie: refreshToken=YOUR_REFRESH_COOKIE" \
  -H "X-Screen-Resolution: 1920x1080" \
  -H "X-Timezone-Offset: -300"

2) Set Organization Context

Pass your organization via header:

-H "X-Organization-ID: 11111111-2222-3333-4444-555555555555"

3) Create Your First Agent

curl -X POST "$BASE_URL/api/agents" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "X-Organization-ID: $ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Agent",
    "masterPrompt": "You are a helpful assistant.",
    "introductoryText": "Hello! How can I help you?",
    "model": "gpt-4",
    "streamResponses": true,
    "enableMcp": false
  }'

List accessible agents:

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
     -H "X-Organization-ID: $ORG_ID" \
     "$BASE_URL/api/agents"

4) Send Your First Chat

Standard (non-streaming)

curl -X POST "$BASE_URL/api/chat" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_UUID",
    "messages": [
      {"role": "user", "content": "Hello Agent700!"}
    ],
    "streamResponses": false
  }'

SSE Streaming

curl -N -X POST "$BASE_URL/api/chat/stream" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_UUID",
    "messages": [
      {"role": "user", "content": "Stream a response please"}
    ],
    "streamResponses": true
  }'

Expect events like chat_message_response, heartbeat, stream_complete.

SSE Health:

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
     "$BASE_URL/api/chat/stream/health"

5) Integrate Tools with MCP (Optional)

List MCP servers (global):

curl "$BASE_URL/api/mcp/servers"

Agent-scoped examples require JWT, agent ownership, and MCP enabled on the agent.

Add a Server

curl -X POST "$BASE_URL/api/agents/$AGENT_ID/mcp/servers" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "weather-server",
    "url": "https://api.weather.com/mcp",
    "transport_type": "http",
    "timeout": 30
  }'

Call a Tool

curl -X POST "$BASE_URL/api/agents/$AGENT_ID/mcp/tools/call" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "server_name": "weather-server",
    "tool_name": "get_forecast",
    "arguments": {"city": "San Francisco", "days": 5}
  }'

Read a Resource

curl -X POST "$BASE_URL/api/agents/$AGENT_ID/mcp/resources/read" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "server_name": "file-server",
    "uri": "file:///path/to/file.txt"
  }'

6) Alignment Data & App Passwords

Certain endpoints accept either JWT or an App Password (Bearer token starting with app_a7_...).

curl -X POST "$BASE_URL/api/alignment-data" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key":"global.setting.theme","value":"dark"}'

Fetch structured config from a pattern:

curl -H "Authorization: Bearer $TOKEN" \
     "$BASE_URL/api/alignment-data/by-pattern/global.*"

7) QA Sheets & Ratings (Optional)

Create a QA sheet:

curl -X POST "$BASE_URL/api/agents/$AGENT_ID/qa-sheets" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "rows": [
      {"question": "What are your hours?", "answer": "Mon-Fri 9-5", "tags":["hours"]}
    ]
  }'

Submit a rating:

curl -X POST "$BASE_URL/api/ratings" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_UUID",
    "agentRevisionId": 1,
    "messages": [
      {"role":"user","content":"Hi"},
      {"role":"assistant","content":"Hello!"}
    ],
    "rating": 5,
    "notes": "Great response quality"
  }'

8) Billing & Audit (Optional)

User billing:

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
     "$BASE_URL/api/billing/user?start_date=2025-10-01&end_date=2025-10-31"

Organization audit events (requires membership):

Submit:

curl -X POST "$BASE_URL/api/organizations/$ORG_ID/events" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "events":[{"eventType":"USER_ACTION","severity":"INFO","details":{"clicked":"start"}}],
    "batchInfo":{"timestamp":"2025-10-02T12:00:00Z","clientId":"web-client-1"}
  }'

Query:

curl -H "Authorization: Bearer $ACCESS_TOKEN" \
     "$BASE_URL/api/organizations/$ORG_ID/audit-events?hours=24&category=API&severity=INFO&limit=50"

9) Import the OpenAPI Spec

  • File: memory-bank/api-spec.yaml
  • Use with Swagger Editor (https://editor.swagger.io/) or Postman
  • Import the YAML and start testing

Troubleshooting

401 Unauthorized

  • Check JWT or App Password token
  • Refresh the token if expired

403 Forbidden

  • Confirm your organization membership
  • Provide a valid X-Organization-ID header

SSE Issues

  • Verify Bearer token, CORS origin, and connection limits
  • Use the /api/chat/stream/health endpoint

MCP Errors

  • Confirm server configuration and connectivity
  • Check tool names and arguments

Support