Token导航 LogoToken导航TokenDH.com
研究检索敏感数据unknown未标认证来源可访问许可证需确认审计通过

aegraaegra 搜索

Agent Skill

aegra 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

897

周安装

37

下载量

293
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aegra(aegra 搜索)
来源仓库:https://docs.aegra.dev
仓库路径:aegra
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

Aegra 是一个开源的自托管 Agent Protocol 服务器,专为在自有基础设施上运行 LangGraph 代理而设计。

  • 适合部署本地代理服务、管理多助手实例或构建私有化智能体系统,支持 PostgreSQL 持久化。
  • 提供与 LangSmith Deployments 兼容的 SDK 和流式接口,内置人工审核关卡与语义检索能力。
  • 可通过 Docker 或 Kubernetes 部署,配置灵活,支持 JWT/OAuth 等多种认证方式。
  • 首次使用需初始化配置文件并启动服务,确保环境变量正确设置及端口无冲突。

SKILL.md

Aegra Skill

Product summary

Aegra is an open-source, self-hosted Agent Protocol server for running LangGraph agents on your own infrastructure. It provides a drop-in replacement for LangSmith Deployments with the same SDK, full persistence via PostgreSQL, streaming via SSE, human-in-the-loop approval gates, semantic storage with pgvector, and flexible authentication (JWT, OAuth, Firebase, or custom). Key files: aegra.json (configuration), .env (environment variables), Dockerfile and docker-compose.yml (deployment). CLI commands: aegra init, aegra dev, aegra up, aegra serve. Primary docs: https://docs.aegra.dev

When to use

Reach for this skill when:

  • Deploying agents — Setting up a production Aegra server locally, on Docker, PaaS (Railway, Render), or Kubernetes
  • Managing assistants — Creating, versioning, searching, or updating configured graph instances
  • Building conversations — Creating threads, managing state, accessing checkpoint history, searching by metadata
  • Streaming responses — Configuring stream modes, handling SSE reconnection, implementing background runs
  • Adding authentication — Implementing JWT, OAuth, Firebase, or custom auth handlers with authorization rules
  • Human-in-the-loop — Adding approval gates, tool review, or user intervention points in agent execution
  • Persistent storage — Using key-value or semantic (vector) storage for conversation memory, knowledge bases, or user preferences
  • Observability — Configuring tracing to Langfuse, Phoenix, or generic OTLP backends
  • Custom routes — Adding FastAPI endpoints alongside the Agent Protocol API

Quick reference

CLI commands

CommandUse caseStarts DB?Starts app?
aegra initCreate new project
aegra devLocal developmentYes (Docker)Yes (host, hot reload)
aegra upSelf-hosted Docker productionYes (Docker)Yes (Docker)
aegra servePaaS, containers, bare metalNoYes (host)
aegra downStop Docker services

Configuration files

FilePurpose
aegra.jsonDefine graphs, auth, HTTP routes, semantic store
.envDatabase, Redis, LLM keys, logging, observability
DockerfileContainer image for deployment
docker-compose.ymlPostgreSQL + app (dev/prod) or PostgreSQL + Redis + app (prod)

Core API patterns

# Initialize client
from langgraph_sdk import get_client
client = get_client(url="http://localhost:2026")

# Assistants (configured graph instances)
assistant = await client.assistants.create(graph_id="agent", name="My Agent")
assistants = await client.assistants.search(graph_id="agent")
await client.assistants.update(assistant_id, name="Updated")

# Threads (conversations with persistent state)
thread = await client.threads.create(metadata={"user": "alice"})
state = await client.threads.get_state(thread_id)
await client.threads.update_state(thread_id, values={...})

# Runs (agent executions)
async for chunk in client.runs.stream(thread_id, assistant_id, input={...}):
    print(chunk)
run = await client.runs.create(thread_id, assistant_id, input={...})
await client.runs.cancel(thread_id, run_id)

# Store (key-value + semantic)
await client.store.put_item(namespace=["users", "alice"], key="prefs", value={...})
items = await client.store.search_items(namespace_prefix=["users"], query="...", limit=10)

Environment variables (key ones)

VariableDefaultPurpose
DATABASE_URLPostgreSQL connection (takes precedence over POSTGRES_*)
POSTGRES_HOST, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_PORT, POSTGRES_DBlocalhost, user, password, 5432, aegraIndividual DB config
REDIS_BROKER_ENABLEDfalseEnable Redis for multi-instance SSE and worker job queue
REDIS_URLredis://localhost:6379/0Redis connection
OPENAI_API_KEYLLM provider key
AUTH_TYPEnoopnoop (no auth) or custom
OTEL_TARGETSObservability: LANGFUSE, PHOENIX, GENERIC
WORKER_COUNT3Number of worker loops per instance
N_JOBS_PER_WORKER10Max concurrent runs per worker

Decision guidance

When to use each deployment command

ScenarioCommandWhy
Local development with hot reloadaegra devStarts PostgreSQL in Docker, runs app on host with auto-reload
Self-hosted production (your infrastructure)aegra upStarts PostgreSQL + Redis + app in Docker with health checks and auto-restart
PaaS platform (Railway, Render, Fly.io)aegra serveNo Docker orchestration; you provide managed PostgreSQL and Redis
Kubernetesaegra serve in pod specUse managed PostgreSQL (CloudSQL, RDS) and Redis (ElastiCache)
Single-instance PaaS without Redisaegra serve with REDIS_BROKER_ENABLED=falseRuns execute as in-process asyncio tasks; suitable for single instance

When to use stream modes

ModeUse case
valuesFull state snapshot after each node (good for UI state updates)
updatesOnly state deltas (efficient for large state objects)
messagesLLM tokens and tool calls with accumulation (best for chat UI)
messages-tupleRaw message tuples without accumulation (JavaScript compatibility)
customUser-defined data from get_stream_writer() in nodes
eventsLow-level LangGraph events for fine-grained tracing

When to use static vs factory graphs

NeedUsePattern
Simple graph, same for all usersStatic graphgraph = builder.compile() in aegra.json
Customize graph per user (tools, models)Factory graphdef graph(runtime: ServerRuntime):... returns compiled graph
Manage resources (MCP, DB connections)Factory with async context manager@asynccontextmanager async def graph(runtime):...
Access user context in nodesRuntime[T] parameterAdd runtime: Runtime[MyContext] to node function

Workflow

1. Create and run a new Aegra project

  1. Initialize project: aegra init → choose template (simple-chatbot or react-agent) and location
  2. Configure environment: cp.env.example.env → add OPENAI_API_KEY and other secrets
  3. Install dependencies: uv sync (uses uv for dependency management)
  4. Start dev server: uv run aegra dev → PostgreSQL starts in Docker, app runs on host with hot reload
  5. Verify: Visit http://localhost:2026/docs to see API docs
  6. Test: Use LangGraph SDK client to create threads and run agents

2. Deploy to production with Docker

  1. Ensure aegra.json is configured with all graphs, auth, and routes
  2. Set environment variables in .env (DATABASE_URL, OPENAI_API_KEY, AUTH_TYPE, etc.)
  3. Build and start: aegra up → generates docker-compose.yml if needed, builds image, starts PostgreSQL + Redis + app
  4. Verify health: Check GET /health, GET /ready, GET /live endpoints
  5. Monitor: Logs from docker compose logs -f show migrations, startup, and runtime errors

3. Add authentication

  1. Create auth handler (e.g., my_auth.py): from langgraph_sdk import Auth auth = Auth() @auth.authenticate async def authenticate(headers: dict) -> dict: token = headers.get("Authorization", "").replace("Bearer ", "") # Verify token (JWT, OAuth, Firebase, etc.) return {"identity": "user123", "permissions": ["read", "write"]}
  2. Add to aegra.json: "auth": {"path": "./my_auth.py:auth"}
  3. Restart server: aegra dev or aegra up
  4. Access user in graph: config["configurable"]["langgraph_auth_user"] in nodes or tools

4. Implement human-in-the-loop approval

  1. Add interrupt node to graph that calls interrupt() with action details
  2. Route through approval in conditional edges before tool execution
  3. Client checks thread status: await client.threads.get_state(thread_id) → check interrupts field
  4. Resume with command: await client.runs.stream(..., command={"resume": [{"type": "accept", "args": None}]})
  5. Alternatively use interrupt_before/after: Pass interrupt_before=["tools"] to run without modifying graph code

5. Configure semantic storage

  1. Add store section to aegra.json: {"store": {"index": {"dims": 1536, "embed": "openai:text-embedding-3-small", "fields": ["$"]}}}
  2. Store items: await client.store.put_item(namespace=[...], key="...", value={...})
  3. Search semantically: await client.store.search_items(namespace_prefix=[...], query="...", limit=10)
  4. In graph nodes: Use store: BaseStore parameter (auto-injected by LangGraph)

Common gotchas

  • Install aegra-cli, not aegra — The aegra package on PyPI is a convenience wrapper without version pinning. Always pip install aegra-cli.
  • DATABASE_URL takes precedence — If both DATABASE_URL and individual POSTGRES_* variables are set, DATABASE_URL wins and POSTGRES_* are ignored.
  • Migrations run automatically — Don't run them manually. They apply on startup for all deployment methods.
  • Redis is optional in dev, required in productionaegra dev works without Redis (REDIS_BROKER_ENABLED=false). For multi-instance production, set REDIS_BROKER_ENABLED=true and provide a Redis URL.
  • Stream mode debug is always enabled internally — You only receive debug events if you explicitly request them in stream_mode. Otherwise, only interrupt events are forwarded.
  • Interrupts use command, not input — When resuming an interrupted run, pass command={"resume": [...]}, not input. These are mutually exclusive.
  • Store values must be JSON objects — Primitive values (strings, numbers) are rejected. Wrap them: {"value": "text"}.
  • User isolation is automatic with auth — Threads and store items are scoped to the authenticated user. No manual filtering needed.
  • Factory graphs get user context at build timeServerRuntime.user is available when the factory is called (for structural decisions). Execution-time user data goes in config["configurable"]["langgraph_auth_user"].
  • Windows doesn't support aegra serve — Use aegra dev or aegra up (Docker) on Windows. aegra serve requires Linux/macOS because psycopg needs SelectorEventLoop.
  • Health checks are critical in Docker — Generated docker-compose.yml includes health checks. If the app hangs, Docker marks it unhealthy and restarts it (with restart: unless-stopped).
  • CORS defaults to allow all origins — Default is allow_origins: ["*"] with allow_credentials: false. When you specify concrete origins, allow_credentials defaults to true automatically.

Verification checklist

Before submitting work with Aegra:

  • Configuration: aegra.json is valid JSON and all graph import paths exist
  • Environment: .env has all required keys (DATABASE_URL or POSTGRES_*, OPENAI_API_KEY, etc.)
  • Database: Can connect to PostgreSQL; migrations have run (check logs for "Alembic" messages)
  • Graphs: All graphs in aegra.json load without import errors (check startup logs)
  • Auth: If auth is configured, test with valid and invalid tokens; verify user data is accessible in nodes
  • Assistants: Default assistants created for each graph (one per graph ID in aegra.json)
  • Threads: Can create threads, retrieve state, update state without errors
  • Runs: Can stream runs, receive events, handle interrupts (if HITL is implemented)
  • Store: Can put/get/search items; semantic search works if configured
  • Streaming: Multiple stream modes work; SSE reconnection works (if Redis is enabled)
  • Health endpoints: /health, /ready, /live return 200 OK
  • Deployment: Docker image builds; containers start and stay healthy; migrations apply on startup
  • Observability: Traces are exported to configured backend (Langfuse, Phoenix, etc.) if enabled

Resources


For additional documentation and navigation, see: https://docs.aegra.dev/llms.txt

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

75.51%
按下载量换算221

安全审计

Socket

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills