Skip to main content
Agents in Pawa AI can engage in rich, multi-turn conversations with users.
Each conversation request includes the current user message, optional prior chat history, routing details, and generation parameters.
Conversations support:
  • Context memory — preserve prior messages for coherent dialogue.
  • Routing — use orchestration agents (e.g., a RouterAgent) to direct queries to specialized agents.
  • Custom instructions — guide the agent’s reasoning and behavior.
  • Fine-tuned control — adjust randomness, response length, and penalties for repetition.

Agent Request Schema Example

FieldTypeDescription
namestringName of the agent handling the conversation.
descriptionstringA brief description of the agent’s purpose.
instructionstringBehavioral guidance for the agent.
intentsarrayOptional: predefined conversational styles or goals (e.g., “Be gentle”, “Be detailed”).
modelstringModel powering the conversation (e.g., pawa-v1-blaze-20250318).
messageobjectThe latest message from the user.
agentsarrayIDs of other agents available for orchestration or delegation.
memoryChatarrayConversation history for context preservation.
temperaturenumberControls randomness of responses (default: 0.1).
top_pnumberNucleus sampling threshold (default: 0.95).
max_tokensnumberMaximum tokens to generate in response.
frequency_penaltynumberPenalizes repeated phrases (default: 0.3).
presence_penaltynumberEncourages exploration of new topics (default: 0.3).
seednumberRandom seed for reproducibility.
streambooleanWhether to stream the response (true) or return once complete (false).

Example Agent Chat Request

curl -X POST "https://api.pawa-ai.com/v1/agents/chat/request" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PAWA_AI_API_KEY" \
  -d '{
  "name": "RouterAgent",
  "description": "An orchestration agent responsible for routing user queries to the most appropriate specialist agent. If a query doesn't match any specific agent, this agent will attempt to answer the question directly.",
  "instruction": "Your primary function is to analyze user queries and determine the best agent to handle them. If the query is unrelated to any known agents or requires general router knowledge, respond directly to the user with helpful information. Prioritize efficient routing and provide clear explanations when responding directly.",
  "intents": [
    "Be gentle",
    "Be detailed"
  ],
  "model": "pawa-v1-blaze-20250318",
  "message": {
    "role": "user",
    "content": [
      {
        "type": "text",
        "text": "What was the score of Yanga in CAF 2025?"
      }
    ]
  },
  "agents": [72],
  "memoryChat": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Habari yako?"
        }
      ]
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "Nzuri sana, asante. Wewe je?"
        }
      ]
    }
  ],
  "temperature": 0.1,
  "top_p": 0.95,
  "max_tokens": 4096,
  "frequency_penalty": 0.3,
  "presence_penalty": 0.3,
  "seed": 2024,
  "stream": false
}'
You can send, multiple agents as list if you want to implement agents orchestration, agents collaboration etc.
I