agentstack-wrapper

Wraps existing Python agents as Agent Stack services using agentstack-sdk with minimal compatibility changes.

1.2k|187|Updated Jan 27, 2025
One-click install
npx skills add https://github.com/i-am-bee/agentstack --skill agentstack-wrapper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agentstack-wrapper
Source: https://github.com/i-am-bee/agentstack/tree/main/skills/agentstack-wrapper
Command: npx skills add https://github.com/i-am-bee/agentstack --skill agentstack-wrapper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agentstack-sdk, a2a-sdk, and includes references (resource) components.

What problem does it solve?

Migrating an existing Python agent to a deployable Agent Stack service normally requires learning the A2A protocol, extension system, and platform APIs from scratch, risking accidental business-logic rewrites and security mistakes like leaking secrets into shared environments.

Core Features & Use Cases

  • Guided Wrapping Workflow: An 11-step checklist covering dependency pinning, server entrypoint creation, LLM wiring, forms, file uploads, secrets, and output handling.
  • Extension Integration: Maps agent needs to platform extensions (LLM Proxy, Forms, Trajectory, Files, Secrets, OAuth, MCP, RAG) with mandatory documentation-first implementation rules.
  • Safety Constraints: Enforces no business-logic changes, no secret exposure, no CLI arguments, and no local filesystem assumptions, with verification checklists and a finalization report.
  • Use Case: You have a LangChain-based research agent that reads API keys from env vars and takes CLI arguments. This Skill walks you through converting it into an Agent Stack server with form-based inputs, Secrets extension credentials, and trajectory output—without touching its core logic.

Quick Start

Ask the AI to wrap your existing Python agent project as an Agent Stack service using the agentstack-wrapper skill, pointing it at your agent's source directory.

Frequently Asked Questions about agentstack-wrapper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy an existing Python agent to Agent Stack?

Add agentstack-sdk to your existing dependency manifest, create a server wrapper with @server.agent() around your agent logic, and wire configuration through platform extensions. The skill's 11-step checklist covers dependencies, entrypoint, LLM wiring, forms, secrets, and output handling.

How do I pass API keys to an agent in Agent Stack?

Use the Secrets extension to request credentials at runtime and pass them explicitly to client constructors, never via os.environ. Agent Stack runs multi-tenant infrastructure, so setting environment variables would expose one user's keys to other executions.

Does Agent Stack wrapping require rewriting my agent's business logic?

No. The wrapping constraints explicitly prohibit business-logic changes; only compatibility modifications are allowed. If a compatibility issue forces a logic change, the workflow requires stopping and requesting explicit approval with justification.

Can I wrap an agent that reads files from the local filesystem?

Yes, but filesystem reads must be replaced with platform file uploads using FileField forms and the File API, since local filesystem access is unavailable at runtime. Non-plaintext files like PDFs use platform text extraction with polling.

What Python versions does agentstack-sdk support?

The wrapped agent requires Python 3.12 or higher but below 3.14, and the interpreter must be actively selected in the environment, not merely installed. The readiness check fails otherwise and asks the user to fix it.

When should I not use this wrapping approach?

Do not use it for non-Python runtimes or for building a new agent from scratch; it targets migrating existing Python or framework-based agents. Containerization and auth setup are also out of scope unless explicitly requested.