Skip to main content

Agnes-2.0-Flash

Agnes-2.0-Flash is a fast and efficient language model developed by Sapiens AI, designed for agent workflows, tool calling, coding tasks, reasoning, multi-turn conversations, image understanding, and high-frequency production use cases. Agnes-2.0-Flash achieved strong performance on the Claw-Eval benchmark, ranking 9th on the General Leaderboard with a Pass^3 score of 60.9%, demonstrating strong autonomous agent capabilities among mainstream language models.

Model Overview

Agnes-2.0-Flash is optimized for fast, reliable, and cost-efficient language generation, agent task execution, and image understanding. The model supports the following capabilities:
CapabilityDescription
Chat CompletionGenerate high-quality responses for conversations and applications
Multi-turn ConversationMaintain context continuity across multiple turns
Image URL InputAccept image content through publicly accessible image URLs
Image UnderstandingUnderstand image content, analyze screenshots, and extract visual information
Tool CallingCall external tools and functions for agent workflows
Agent WorkflowsSupport planning, execution, and multi-step task completion
Coding TasksAssist with code generation, debugging, explanation, and refactoring
ReasoningHandle structured reasoning, task decomposition, and decision-making
Streaming OutputReturn responses in real time for a better user experience
OpenAI-Compatible APIUse a request structure compatible with the OpenAI Chat Completions API

Use Cases

Agnes-2.0-Flash is suitable for the following scenarios:
ScenarioExample Use Cases
AI AssistantGeneral Q&A, daily assistant, productivity support
Autonomous AgentsMulti-step task execution, planning, and tool usage
Coding AssistantCode generation, debugging, refactoring, and explanation
Workflow AutomationTask decomposition, process automation, and execution planning
Customer SupportFAQ answering, customer service chatbots, service automation
Search and Q&ASearch-based answers, summarization, information extraction
Content GenerationMarketing copy, articles, product descriptions, scripts
Developer ToolsAPI assistant, documentation assistant, coding copilot
AI-Native ApplicationsConsumer apps, productivity tools, agent applications
Image UnderstandingImage description, screenshot analysis, visual Q&A, information extraction

API Information

Endpoint

ItemDescription
API Endpointhttps://apihub.agnes-ai.com/v1/chat/completions
Request MethodPOST
Content-Typeapplication/json
AuthenticationBearer Token
Authentication HeaderAuthorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel name. Use agnes-2.0-flash
messagesarrayYesConversation message array, including system, user, and assistant messages
messages[].contentstring / arrayYesMessage content. It can be a plain text string or an array containing text and image_url content blocks
temperaturenumberNoControls output randomness. Lower values produce more deterministic results
top_pnumberNoControls nucleus sampling. Lower values make the output more focused
max_tokensnumberNoMaximum number of tokens to generate in the response
streambooleanNoWhether to enable streaming output
toolsarrayNoTool definitions for tool-calling workflows
tool_choicestring / objectNoControls whether and how the model uses tools
chat_template_kwargsobjectNoExtension field for enabling Thinking and other capabilities in OpenAI-compatible requests
thinkingobjectNoField for enabling Thinking mode in Anthropic-compatible requests

Image URL Input Support

Agnes-2.0-Flash supports image input through image URLs. Developers can pass both text instructions and an image URL in the same messages request, allowing the model to understand, analyze, answer questions about, or extract information from the image. Supported input types:
Input TypeFormatDescription
TexttextPlain text instruction or question
Image URLimage_urlPass image content through a publicly accessible image URL

Image Content Structure

When using image URL input, messages[].content should use an array structure. Each content block represents one type of input.
{
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": "Describe the content of this image."
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/image.jpg"
      }
    }
  ]
}

Request Examples

1. Basic Chat Completion Request

Use this request to generate a standard chat completion response.
curl https://apihub.agnes-ai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-2.0-flash",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful AI assistant."
      },
      {
        "role": "user",
        "content": "Explain how autonomous agents use tools to complete tasks."
      }
    ],
    "temperature": 0.7,
    "max_tokens": 1024
  }'

2. Streaming Output Request

Use this request to enable streaming output.
curl https://apihub.agnes-ai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-2.0-flash",
    "messages": [
      {
        "role": "user",
        "content": "Write a short product introduction for an AI assistant app."
      }
    ],
    "stream": true
  }'

3. Tool Calling Request

Use this request for agent workflows that require external tool calls.
curl https://apihub.agnes-ai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-2.0-flash",
    "messages": [
      {
        "role": "user",
        "content": "What is the weather like in Singapore today?"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Get the current weather for a location",
          "parameters": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "description": "The city and country"
              }
            },
            "required": ["location"]
          }
        }
      }
    ]
  }'

4. Image URL Input Request

Use this request to pass an image through an image URL and let the model understand or analyze the image content.
curl https://apihub.agnes-ai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-2.0-flash",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Describe the content of this image."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/image.jpg"
            }
          }
        ]
      }
    ]
  }'

Response Format

{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "created": 1774432125,
  "model": "agnes-2.0-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Autonomous agents use tools by understanding the user's goal, breaking it into steps, selecting the right tools, executing actions, and using the results to complete the task."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 35,
    "completion_tokens": 58,
    "total_tokens": 93
  }
}

Response Fields

FieldTypeDescription
idstringUnique ID of the completion request
objectstringObject type, usually chat.completion
createdintegerRequest timestamp
modelstringModel used for the request
choicesarrayList of generated response results
choices[].indexintegerIndex of the response result
choices[].messageobjectAssistant message object
choices[].message.rolestringRole of the message sender
choices[].message.contentstringResponse content generated by the model
choices[].finish_reasonstringReason why generation stopped
usageobjectToken usage information
usage.prompt_tokensintegerNumber of input tokens
usage.completion_tokensintegerNumber of output tokens
usage.total_tokensintegerTotal number of tokens used

Enable Thinking for Coding Tasks

For coding, debugging, reasoning, and agent workflows, it is recommended to enable Thinking mode to improve code quality, task decomposition, and problem-solving performance.

OpenAI-Compatible Request

When using the OpenAI-compatible API format, add chat_template_kwargs.enable_thinking to the request body:
{
  "model": "agnes-2.0-flash",
  "messages": [
    {
      "role": "user",
      "content": "Help me write a Python script to process a CSV file."
    }
  ],
  "chat_template_kwargs": {
    "enable_thinking": true
  }
}

Anthropic-Compatible Request

When using the Anthropic-compatible API format, add the thinking field to the request body:
{
  "model": "agnes-2.0-flash",
  "messages": [
    {
      "role": "user",
      "content": "Help me refactor this TypeScript function and explain the changes."
    }
  ],
  "thinking": {
    "type": "enabled",
    "budget_tokens": 2048
  }
}
budget_tokens controls the maximum Thinking token budget. For common coding tasks, it is recommended to start with 2048. For more complex debugging, refactoring, or multi-step agent tasks, you can increase the value as needed.

Features and Compatibility

Agnes-2.0-Flash supports the following capabilities:
  • Chat Completion
  • Multi-turn conversation
  • System prompt
  • Image URL input
  • Image understanding
  • Streaming output
  • Tool calling
  • Agent workflows
  • Coding tasks
  • Reasoning tasks
  • JSON-style output
  • OpenAI Chat Completions API-compatible request structure

Best Practices

Prompt Writing Tips

For better results, provide clear instructions, sufficient context, and the expected output format.

Example: Product Copy Generation

text
You are a product marketing expert. Write a concise App Store description for an AI assistant app. The tone should be clear, professional, and user-friendly.

Example: Coding Task

For coding tasks, provide the programming language, framework, error message, and expected behavior.
text
Help me debug this React component. The issue is that the button state does not update after clicking. Explain the cause and provide the corrected code.

Example: Agent Workflow

For agent workflows, clearly describe the goal, available tools, and task constraints.
text
You are an autonomous research agent. Search for relevant information, summarize the key findings, and return the result in a structured format with source links.

Example: Image Understanding Task

For image understanding tasks, clearly state what the model should focus on, such as overall description, text extraction, UI analysis, object recognition, or structured output.
text
Analyze this screenshot. Identify the main UI elements, explain the possible issue, and provide suggestions to improve the user experience.

Use the following structure to organize prompts:
text
[Role] + [Task] + [Context] + [Requirements] + [Output Format]

Example

text
You are a senior product manager. Analyze this feature idea for an AI assistant app. Consider user value, implementation complexity, risks, and return the result in a structured table.

Image Understanding Prompt Example

text
You are an image analysis assistant. Analyze the provided image URL, summarize the key information, identify potential issues, and return the result in a structured table.

Image URL Usage Tips

  • The image URL must be publicly accessible.
  • If the image URL requires login, authentication, or has hotlink protection, the model may not be able to read it.
  • It is recommended to use standard image formats such as JPG, JPEG, PNG, or WebP.
  • For screenshots, error images, or product UI images, add text instructions to clarify what the model should focus on.
  • Image URL input can be used together with tool calling, streaming output, and agent workflows.

Model Limits

ItemValue
Context256K
Max Output65.5K

Pricing

TypePriceCurrent Price
Input Tokens$0.03 / 1M tokens$0 / 1M tokens
Output Tokens$0.15 / 1M tokens$0 / 1M tokens

Notes

  • Use agnes-2.0-flash as the model name.
  • A basic Chat Completion request must include model and messages.
  • messages[].content can be a plain text string or an array containing text and an image URL.
  • To input an image, use image_url and provide a publicly accessible image URL.
  • To enable streaming responses, set stream to true.
  • For tool-calling workflows, provide tools and optionally tool_choice.
  • temperature controls randomness. Lower values are better for deterministic tasks, while higher values are better for creative generation.
  • Agnes-2.0-Flash is suitable for production applications that require fast responses, strong task completion, image understanding, and reliable agent performance.