agents

agents is a cursor rule for Cursor from linhai0872/agno-agent-starter. It costs 0 tokens per session (480 once invoked), scanned A, original, MIT.

A set of coding rules for building Agno agents in a consistent Python project structure, including templates and typed result formats.

In plain words
What is it for?
Use it to create new agents, organize prompts and tools, configure models and databases, register agents, and define structured results with Pydantic.
Why use it?
It gives each agent a predictable home, setup process, configuration, and output shape, reducing guesswork when adding or maintaining agents.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/linhai0872/agno-agent-starter/agents
Clone the repo
git clone --depth 1 https://github.com/linhai0872/agno-agent-starter

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agents

README.md
[![agentmods](https://agentmods.dev/badge/rules/linhai0872/agno-agent-starter/agents.svg)](https://agentmods.dev/rules/linhai0872/agno-agent-starter/agents)
Your own site
<a href="https://agentmods.dev/rules/linhai0872/agno-agent-starter/agents"><img src="https://agentmods.dev/badge/rules/linhai0872/agno-agent-starter/agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 480 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00480
Opus 5 $0.00000 $0.00240
Sonnet 5 $0.00000 $0.00096
Haiku 4.5 $0.00000 $0.00048

Measured 3d ago against content hash 015271ea04d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/agents.mdc · 83 lines

What it actually says

Agent 开发规范

目录结构

app/agents/{agent_name}/
├── __init__.py    # 导出
├── agent.py       # Agent 定义 + ModelConfig
├── prompts.py     # System Prompt
├── schemas.py     # Pydantic Schema(Structured Output)
└── tools.py       # 工具函数(可选)

创建流程

  1. 创建目录: mkdir -p app/agents/my_agent
  2. 实现 agent.py(参考模板)
  3. app/agents/__init__.py 注册

Agent 模板

from agno.agent import Agent
from agno.db.postgres import PostgresDb
from app.models import ModelConfig, create_model

AGENT_MODEL_CONFIG = ModelConfig(
    model_id="google/gemini-2.5-flash-preview-09-2025",
    temperature=0.2,
    max_tokens=8192,
)

def create_my_agent(db: PostgresDb) -> Agent:
    return Agent(
        id="my-agent",              # kebab-case
        name="My Agent",
        model=create_model(AGENT_MODEL_CONFIG),
        db=db,
        instructions=SYSTEM_PROMPT,
        tools=[...],
        markdown=True,
    )

Structured Output

from pydantic import BaseModel, Field

class MyOutput(BaseModel):
    result: str = Field(..., description="结果")
    confidence: float = Field(..., ge=0, le=1)

agent = Agent(
    output_schema=MyOutput,
    use_json_mode=True,
)

注册

# app/agents/__init__.py
from app.agents.my_agent.agent import create_my_agent
agents.append(create_my_agent(db))

关键参数

参数 说明
id Agent ID,kebab-case,决定 API URL
model 模型实例,使用 create_model()
db PostgresDb 连接
instructions System Prompt
tools 工具函数列表
output_schema Pydantic Model(可选)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 83 lines · 0 tokens per session scan A 015271ea04d6

Subscribe to this mod's changes

agents is a cursor rule published in the GitHub repository linhai0872/agno-agent-starter (6 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 480 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.