Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
docs: update sdk examples misc (#836)
Charles Packer2198dc6af3c2
diff --git a/examples/docs/example.py b/examples/docs/example.pyindex 545e3d5b1..08424e39b 100644--- a/examples/docs/example.py+++ b/examples/docs/example.py@@ -2,9 +2,11 @@ from letta_client import CreateBlock, Letta, MessageCreate"""Make sure you run the Letta server before running this example.-```-letta server-```+See: https://docs.letta.com/quickstart++If you're using Letta Cloud, replace 'baseURL' with 'token'+See: https://docs.letta.com/api-reference/overview+Execute this script using `poetry run python3 example.py`"""client = Letta(@@ -39,10 +41,12 @@ print(f"Sent message to agent {agent.name}: {message_text}")print(f"Agent thoughts: {response.messages[0].reasoning}")print(f"Agent response: {response.messages[1].content}")+def secret_message():"""Return a secret message."""return "Hello world!"+tool = client.tools.upsert_from_function(func=secret_message,)@@ -112,4 +116,4 @@ print(f"Agent response: {response.messages[1].content}")client.agents.delete(agent_id=agent.id)client.agents.delete(agent_id=agent_copy.id)-print(f"Deleted agents {agent.name} and {agent_copy.name}")\ No newline at end of file+print(f"Deleted agents {agent.name} and {agent_copy.name}")diff --git a/examples/docs/node/example.ts b/examples/docs/node/example.tsindex cd0b0ac13..1b52c7dea 100644--- a/examples/docs/node/example.ts+++ b/examples/docs/node/example.ts@@ -8,9 +8,11 @@ import {/*** Make sure you run the Letta server before running this example.- * ```- * letta server- * ```+ * See https://docs.letta.com/quickstart+ *+ * If you're using Letta Cloud, replace 'baseURL' with 'token'+ * See https://docs.letta.com/api-reference/overview+ ** Execute this script using `npm run example`*/const client = new LettaClient({