Metadata-Version: 2.4
Name: agenticdisco
Version: 1.0.0
Summary: Persistent memory + multi-agent channel for any AI stack. The memory that never forgets.
Author-email: Agentic Disco <hello@agenticdisco.com>
License: MIT
Project-URL: Homepage, https://agenticdisco.com
Project-URL: Documentation, https://agenticdisco.com/docs
Project-URL: Repository, https://github.com/agenticdisco/agenticdisco-python
Project-URL: Bug Tracker, https://github.com/agenticdisco/agenticdisco-python/issues
Keywords: ai,agents,memory,llm,openai,multi-agent,persistent-memory
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: responses; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# agenticdisco

**Persistent memory + multi-agent channel for any AI stack.**

The official Python SDK for [Agentic Disco](https://agenticdisco.com) — the memory layer that never forgets. Drop persistent cross-session memory and multi-agent coordination into any Python app in under 5 minutes.

```
pip install agenticdisco
```

---

## Why

Every LLM conversation resets. Your agents forget everything the moment a session ends. Agentic Disco fixes that with a simple HTTP API — write memory, read it back from any agent, any session, any time.

| Without Agentic Disco | With Agentic Disco |
|---|---|
| Every conversation starts blank | Agents recall past sessions |
| Each agent is isolated | All agents share a memory layer |
| You build custom memory logic | Two method calls handle it |
| Context lost on restart | Persistent across all sessions |

---

## Quickstart

```python
from agenticdisco import AgenticDisco

disco = AgenticDisco("your_disco_key")  # Get yours free at agenticdisco.com

# Store a memory
disco.remember("user_goal", "build a web app", category="goals")
disco.remember("preferred_language", "Python", category="preferences")

# Recall all memories
memories = disco.recall()
for m in memories:
    print(f"[{m.category}] {m.key}: {m.value}")

# Recall as a flat dict
context = disco.recall(as_dict=True)
print(context["user_goal"])  # "build a web app"

# Post to the agent channel
disco.post("SCOUT", "Research complete — 12 sources found")
disco.post("FORGE", "Code generated and tested")

# Read the channel
for msg in disco.listen():
    print(f"[{msg.agent_name}] {msg.message}")
```

---

## OpenAI Integration — 2 Lines

The most common use case: give your ChatGPT-powered app a persistent memory that survives across sessions.

```python
from openai import OpenAI
from agenticdisco import AgenticDisco

client = OpenAI(api_key="your_openai_key")
disco = AgenticDisco("your_disco_key")

def chat(user_input: str, user_id: str) -> str:
    messages = [{"role": "user", "content": user_input}]

    # ✨ Inject persistent memory — one line
    messages = disco.inject_memory(messages)

    response = client.chat.completions.create(
        model="gpt-4",
        messages=messages
    )

    reply = response.choices[0].message.content

    # ✨ Save the conversation — one line
    messages.append({"role": "assistant", "content": reply})
    disco.save_conversation(messages, agent_name="my-gpt-bot")

    return reply
```

That's it. Your GPT now remembers user goals, preferences, and past conversations — forever.

---

## All Methods

### Memory

| Method | Description |
|---|---|
| `disco.remember(key, value, category=None)` | Write a memory entry |
| `disco.recall(category=None, as_dict=False)` | Read all memory entries |
| `disco.forget(key)` | Clear a memory entry |
| `disco.inject_memory(messages)` | Inject memory into an OpenAI messages list |
| `disco.save_conversation(messages, agent_name)` | Save a conversation to memory |

### Channel

| Method | Description |
|---|---|
| `disco.post(agent_name, message)` | Post a message to the agent channel |
| `disco.listen(limit=None)` | Read all channel messages |

---

## Multi-Agent Example

Multiple agents sharing the same memory layer — coordinated via the channel.

```python
from agenticdisco import AgenticDisco

# All agents use the same Disco Key — they share memory automatically
scout  = AgenticDisco("your_disco_key")
forge  = AgenticDisco("your_disco_key")
vera   = AgenticDisco("your_disco_key")

# SCOUT does research, writes findings to memory
scout.remember("research_topic", "persistent memory for AI agents")
scout.remember("sources_found", "12", category="research")
scout.post("SCOUT", "Research complete. 12 sources found.")

# FORGE reads SCOUT's memory and builds on it
context = forge.recall(as_dict=True)
print(context["research_topic"])  # "persistent memory for AI agents"
forge.post("FORGE", f"Building on SCOUT's research: {context['research_topic']}")

# VERA validates and reads the full channel history
for msg in vera.listen():
    print(f"[{msg.agent_name}] {msg.message}")
```

---

## Error Handling

```python
from agenticdisco import AgenticDisco, DiscoAuthError, DiscoRateLimitError, DiscoAPIError

disco = AgenticDisco("your_disco_key")

try:
    memories = disco.recall()
except DiscoAuthError:
    print("Invalid Disco Key — get yours at agenticdisco.com")
except DiscoRateLimitError:
    print("Rate limit hit — upgrade at agenticdisco.com/pricing")
except DiscoAPIError as e:
    print(f"API error: {e}")
```

---

## Pricing

| Plan | Price | Memory Entries | Channel Messages |
|---|---|---|---|
| Free | $0/mo | 500 | 1,000/mo |
| Builder | $19/mo | 50,000 | 100,000/mo |
| Pro | $79/mo | Unlimited | Unlimited |

No credit card required to start. [Get your free key →](https://agenticdisco.com)

---

## Links

- **Website:** [agenticdisco.com](https://agenticdisco.com)
- **API Docs:** [agenticdisco.com/docs](https://agenticdisco.com/docs)
- **Get API Key:** [agenticdisco.com/get-key](https://agenticdisco.com)
- **Issues:** [GitHub Issues](https://github.com/agenticdisco/agenticdisco-python/issues)

---

MIT License © 2026 Agentic Disco
