QUICKSTART
Get started in 2 minutes
One SDK. One decorator. Full observability for your AI agents.
1. Install the SDK
pip install agentshield2. Get your API key
Sign up at app.agentshield.one and copy your API key from Settings → API Keys.
export AGENTSHIELD_API_KEY="ags_live_..."Or configure it in code:
import agentshield as shield
shield.configure(api_key="ags_live_...")3. Add the decorator
Wrap your agent function with @shield(). That's it.
import agentshield as shield
@shield(agent="my-research-agent")
async def run_agent(query: str) -> str:
response = await openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": query}]
)
return response.choices[0].message.content4. Track sessions (optional)
Group events into a session for replay:
from agentshield import session
@shield(agent="my-agent")
async def run_agent(query: str) -> str:
with session(name="user-research") as s:
# All calls inside this block are grouped
result = await fetch_data(query)
answer = await generate_answer(result)
return answer5. Verify it's working
Open your dashboard and you should see your first event:
# Check the dashboard
open https://app.agentshield.one/dashboardNext steps
- → Full SDK Reference
- → Framework Integrations (LangChain, CrewAI, AutoGen)
- → API Reference