About agnes-free-text
A skill for calling Sapiens AI's Agnes-2.0-Flash text model through the Agnes API. It supports chat requests, multi-turn messages, streaming, and tool definitions via a repeatable Python script.
Key features
- 01Chat completion requests
- 02System prompts and multi-turn messages
- 03Streaming responses
- 04JSON-based tool definitions and choice
- 05Dry-run request validation
- 06Save raw response JSON
Use cases
- 01Generate a concise text response
- 02Send conversation context across multiple turns
- 03Test a request shape before calling the API
- 04Request a model response with tool definitions
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ kangarooking/ agnes-free-model-skills --skill agnes-free-textAfter installing, type/agnes-free-textin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/api.mdscripts/agnes_text.pyDetails
From the project READMEAgnes Free Text
Use this skill to call Sapiens AI's Agnes-2.0-Flash text model through the Agnes API.
Credential Rule
Read the API key from the environment. Do not hardcode keys in prompts, scripts, skill files, commits, or shell history.
Preferred variable:
export AGNES_API_KEY="..."
The helper also accepts AGNES_TOKEN as a fallback.
Quick Start
Run a normal chat completion:
python3 scripts/agnes_text.py chat \
--prompt "用三句话解释 Agent 为什么需要工具调用"
Use a system prompt and save the raw response JSON:
python3 scripts/agnes_text.py chat \
--system "You are a concise technical writer." \
--prompt "Explain tool calling for a beginner." \
--output-json ./outputs/agnes-free-text/response.json
Pass tool definitions from JSON:
python3 scripts/agnes_text.py chat \
--prompt "Decide whether a weather tool is needed." \
--tools-json ./tools.json \
--tool-choice auto
Validate the request shape without calling the API:
python3 scripts/agnes_text.py chat \
--prompt "Write a short product intro." \
--max-tokens 300 \
--dry-run
Workflow
- Clarify whether the user wants a direct answer, JSON-like structured output, coding help, or streaming output.
- Use
scripts/agnes_text.pyfor repeatable calls. Prefer--dry-runfirst when parameters are complex. - Keep the model fixed to
agnes-2.0-flashunless the API docs are updated. - For multi-turn context, pass repeated
--message role:contentvalues instead of flattening the conversation into one prompt. - For tool calling, pass
--tools-jsonas either an inline JSON array or a path to a JSON file.
Notes
- Endpoint:
POST https://apihub.agnes-ai.com/v1/chat/completions - Model:
agnes-2.0-flash - Request shape is compatible with OpenAI Chat Completions.
- Supported features include system prompts, multi-turn messages, streaming, tool definitions, and tool choice.
- If the API returns an authorization error, check
AGNES_API_KEYfirst.
Reference
Read references/api.md when you need endpoint details, response fields, tool-calling shape, or streaming examples.