Skip to content

Agno

Verified 2026-08-19 — PASS, 9s. Session persistence: native SqliteDb.

The shortest integration of the ten. Agno owns persistence entirely — hand it a session_id and it rehydrates history itself.


import sys, os
sys.path.insert(0, os.path.expanduser("~/agenttests"))
import azcfg, hetool
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.db.sqlite import SqliteDb
DB = os.path.expanduser("~/agenttests/agno/agno.db")
def get_working_folder() -> str:
"""Return the agent's current working folder (absolute path)."""
return hetool.get_working_folder()
def run_shell(command: str) -> str:
"""Run a shell command in the working folder and return its output."""
return hetool.run_shell(command)
def invoke(sid, message):
c = azcfg.load()
agent = Agent(
model=OpenAIChat(id=c["model"], base_url=c["base_url"], api_key=c["api_key"]),
db=SqliteDb(db_file=DB),
session_id=sid,
add_history_to_context=True,
tools=[get_working_folder, run_shell],
instructions="Be concise. Use tools for operational questions.",
)
return str(agent.run(message).content).strip()

That is the entire runner — no load, no save, no transcript handling.


{
"type": "process",
"file": "/home/you/agno/.venv/bin/python3",
"nativeSession": true,
"argsNew": ["/home/you/he_adapter.py", "/home/you/agno_session.py", "", "{message}"],
"argsResume": ["/home/you/he_adapter.py", "/home/you/agno_session.py", "{sessionId}", "{message}"],
"replyField": "result",
"sessionIdField": "session_id",
"approve": false,
"workdir": "/home/you/work",
"proxy": { "shape": "openai", "baseUrlEnv": "OPENAI_BASE_URL", "keyEnv": "OPENAI_API_KEY",
"modelEnv": "OPENAI_MODEL", "model": "<route>|<provider model>" }
}

  1. Keep your agent definition as it is.
  2. Pass HBIA’s sid straight through as Agno’s session_id.
  3. Add db=SqliteDb(...) and add_history_to_context=True.
  4. Build OpenAIChat from azcfg.load().
  5. Seal the engine, point external.engine at it, restart.

add_history_to_context=True is not the default. Without it Agno stores the session but does not feed prior turns to the model — persistence that looks like it works and produces an agent with no memory. This is the single most likely thing to get wrong here.

OpenAIChat(id=...), not model=.... The keyword is id.

One SQLite file, many sessions. Keyed by session_id, so a swarm sharing a filesystem shares history correctly — but SQLite over NFS is a known hazard. Keep the db on local disk.

Plain callables as tools, with real docstrings — Agno reads the signature and docstring.