Documentation Index
Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
Agno supports using DynamoDB as a storage backend for Teams using the DynamoDbStorage class.
Usage
You need to provide aws_access_key_id and aws_secret_access_key parameters to the DynamoDbStorage class.
dynamodb_storage_for_team.py
"""
Run: `pip install openai duckduckgo-search newspaper4k lxml_html_clean agno` to install the dependencies
"""
from typing import List
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.storage.dynamodb import DynamoDbStorage
from agno.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.hackernews import HackerNewsTools
from pydantic import BaseModel
class Article(BaseModel):
title: str
summary: str
reference_links: List[str]
hn_researcher = Agent(
name="HackerNews Researcher",
model=OpenAIChat("gpt-4o"),
role="Gets top stories from hackernews.",
tools=[HackerNewsTools()],
)
web_searcher = Agent(
name="Web Searcher",
model=OpenAIChat("gpt-4o"),
role="Searches the web for information on a topic",
tools=[DuckDuckGoTools()],
add_datetime_to_instructions=True,
)
hn_team = Team(
name="HackerNews Team",
mode="coordinate",
model=OpenAIChat("gpt-4o"),
members=[hn_researcher, web_searcher],
storage=DynamoDbStorage(table_name="team_sessions", region_name="us-east-1"),
instructions=[
"First, search hackernews for what the user is asking about.",
"Then, ask the web searcher to search for each story to get more information.",
"Finally, provide a thoughtful and engaging summary.",
],
response_model=Article,
show_tool_calls=True,
markdown=True,
debug_mode=True,
show_members_responses=True,
)
hn_team.print_response("Write an article about the top 2 stories on hackernews")
Params
| Parameter | Type | Default | Description |
|---|
table_name | str | - | Name of the table to be used. |
region_name | Optional[str] | None | Region name of the DynamoDB table. |
aws_access_key_id | Optional[str] | None | AWS access key id, if provided. |
aws_secret_access_key | Optional[str] | None | AWS secret access key, if provided. |
endpoint_url | Optional[str] | None | Endpoint URL, if provided. |
create_table_if_not_exists | bool | True | If true, creates the table if it does not exist. |
Developer Resources