Skip to content

Commit e42a75d

Browse files
committed
Release v4.6.2
1 parent 6693a75 commit e42a75d

File tree

28 files changed

+1628
-23
lines changed

28 files changed

+1628
-23
lines changed

docker/Dockerfile.chat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=4.6.1" \
19+
"praisonai>=4.6.2" \
2020
"praisonai[chat]" \
2121
"embedchain[github,youtube]"
2222

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
2020
# Install Python packages (using latest versions)
2121
RUN pip install --no-cache-dir \
2222
praisonai_tools \
23-
"praisonai>=4.6.1" \
23+
"praisonai>=4.6.2" \
2424
"praisonai[ui]" \
2525
"praisonai[chat]" \
2626
"praisonai[realtime]" \

docker/Dockerfile.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=4.6.1" \
19+
"praisonai>=4.6.2" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""
2+
CockroachDB Serverless Persistence Example.
3+
4+
CockroachDB Serverless provides distributed SQL with scale-to-zero.
5+
Auto-handles serialization retries (error 40001) and SSL.
6+
7+
Setup:
8+
1. Create free CockroachDB Serverless cluster at https://cockroachlabs.cloud
9+
2. Copy connection string from dashboard
10+
3. Set env var: export COCKROACHDB_URL="postgresql://user:pass@xxx.cockroachlabs.cloud:26257/mydb?sslmode=verify-full"
11+
4. pip install praisonai[cockroachdb]
12+
"""
13+
14+
import os
15+
from praisonaiagents import Agent
16+
17+
agent = Agent(
18+
name="CockroachDB Agent",
19+
instructions="You are a helpful assistant.",
20+
db={"database_url": os.getenv("COCKROACHDB_URL")},
21+
session_id="crdb-demo-session",
22+
)
23+
24+
result = agent.start("What is distributed SQL? Explain in 2 sentences.")
25+
print(result)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
Neon Serverless PostgreSQL Persistence Example.
3+
4+
Neon auto-idles after inactivity — you only pay when active.
5+
The PraisonAI adapter auto-handles cold-start retries and SSL.
6+
7+
Setup:
8+
1. Create free Neon project at https://neon.tech
9+
2. Copy connection string from dashboard
10+
3. Set env var: export NEON_DATABASE_URL="postgresql://user:pass@ep-xxx.neon.tech/dbname?sslmode=require"
11+
4. pip install praisonai[neon]
12+
"""
13+
14+
import os
15+
from praisonaiagents import Agent
16+
17+
# Option 1: Use NEON_DATABASE_URL env var (recommended)
18+
agent = Agent(
19+
name="Neon Agent",
20+
instructions="You are a helpful assistant.",
21+
db={"database_url": os.getenv("NEON_DATABASE_URL")},
22+
session_id="neon-demo-session",
23+
)
24+
25+
# Option 2: Direct URL
26+
# agent = Agent(
27+
# name="Neon Agent",
28+
# instructions="You are a helpful assistant.",
29+
# db={"database_url": "postgresql://user:pass@ep-xxx.neon.tech/dbname?sslmode=require"},
30+
# session_id="neon-demo-session",
31+
# )
32+
33+
result = agent.start("What is serverless PostgreSQL? Explain in 2 sentences.")
34+
print(result)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
Supabase Direct PostgreSQL Persistence Example.
3+
4+
Supabase offers two connection modes:
5+
1. REST API (via supabase-py) — set SUPABASE_URL + SUPABASE_KEY
6+
2. Direct PostgreSQL (via psycopg2) — use Postgres connection string
7+
8+
This example uses direct PostgreSQL mode with auto-retry for paused projects.
9+
10+
Setup:
11+
1. Create free Supabase project at https://supabase.com
12+
2. Go to Settings > Database > Connection string (URI)
13+
3. Set env var: export SUPABASE_DATABASE_URL="postgresql://postgres.xxx:[pass]@xxx.pooler.supabase.com:6543/postgres"
14+
4. pip install praisonai[postgresql]
15+
"""
16+
17+
import os
18+
from praisonaiagents import Agent
19+
20+
agent = Agent(
21+
name="Supabase Agent",
22+
instructions="You are a helpful assistant.",
23+
db={"database_url": os.getenv("SUPABASE_DATABASE_URL")},
24+
session_id="supabase-demo-session",
25+
)
26+
27+
result = agent.start("What is Supabase? Explain in 2 sentences.")
28+
print(result)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""
2+
Turso/libSQL Persistence Example.
3+
4+
Turso provides SQLite-at-the-edge with automatic sync and scale-to-zero.
5+
6+
Setup:
7+
1. Create free Turso database at https://turso.tech
8+
2. Run: turso db tokens create <db-name>
9+
3. Set env vars:
10+
export TURSO_DATABASE_URL="libsql://mydb-user.turso.io"
11+
export TURSO_AUTH_TOKEN="eyJ..."
12+
4. pip install praisonai[turso]
13+
"""
14+
15+
import os
16+
from praisonaiagents import Agent
17+
18+
agent = Agent(
19+
name="Turso Agent",
20+
instructions="You are a helpful assistant.",
21+
db={
22+
"database_url": os.getenv("TURSO_DATABASE_URL"),
23+
"auth_token": os.getenv("TURSO_AUTH_TOKEN"),
24+
},
25+
session_id="turso-demo-session",
26+
)
27+
28+
result = agent.start("What is edge computing? Explain in 2 sentences.")
29+
print(result)

src/praisonai-agents/praisonaiagents/db/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class _LazyDbModule:
4848
"PostgresDB": "praisonai.db.adapter",
4949
"SQLiteDB": "praisonai.db.adapter",
5050
"RedisDB": "praisonai.db.adapter",
51+
"NeonDB": "praisonai.db.adapter",
52+
"CockroachDB": "praisonai.db.adapter",
53+
"XataDB": "praisonai.db.adapter",
54+
"TursoDB": "praisonai.db.adapter",
5155
}
5256

5357
def __getattr__(self, name: str):

src/praisonai-agents/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "praisonaiagents"
7-
version = "1.6.1"
7+
version = "1.6.2"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
99
readme = "README.md"
1010
requires-python = ">=3.10"

src/praisonai-agents/tests/unit/test_managed_backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def test_config_importable(self):
2828
def test_config_defaults(self):
2929
from praisonai.integrations.managed_agents import ManagedConfig
3030
cfg = ManagedConfig()
31-
assert cfg.model == "claude-sonnet-4-6"
32-
assert cfg.name == "PraisonAI Managed Agent"
31+
assert cfg.model == "claude-haiku-4-5"
32+
assert cfg.name == "Agent"
3333
assert cfg.tools == [{"type": "agent_toolset_20260401"}]
3434
assert cfg.networking == {"type": "unrestricted"}
3535
assert cfg.packages is None
@@ -455,7 +455,7 @@ def test_update_agent(self):
455455
m._client = mock_client
456456

457457
m.update_agent(system="New instructions")
458-
mock_client.beta.agents.update.assert_called_once_with("agent-001", system="New instructions")
458+
mock_client.beta.agents.update.assert_called_once_with("agent-001", system="New instructions", version=1)
459459
assert m.agent_version == 2
460460
assert m._session_id is None # Session invalidated
461461

0 commit comments

Comments
 (0)