Register and share your invite link to earn from video plays and referrals.

Search results for AgentToAgent
AgentToAgent community
One keyword maps to one global community path.
Create community
People
Not Found
Tweets including AgentToAgent
That moment when your AI agent is more aggressive about snagging you a gym spot than you ever would be… and starts cancelling strangers. We are not ready for the social norms of agent-to-agent conflict. Without protocol-level rules, governing autonomous negotiations, personal agents are about to unleash absolute local chaos. #AIAgents# #AgenticAI# #AutonomousAgents# #AgentToAgent# #PersonalAI# #AgentConflict#
Show more
# Useful but Little-Known Features of Claude Agent SDK 🌍 Want to pause a subagent and pick up where it left off later? Resume keeps the full conversation history intact! Claude Agent SDK lets you resume subagents by capturing their session ID and agent ID, retaining all previous tool calls, results, and reasoning. 📌 Title: Subagent Resume 🔗 URL: 🧩 Overview When a subagent completes, the Agent tool result includes `agentId: `. By saving this `agentId` along with the `session_id`, you can resume the same session using the `resume` option and a prompt like `"Resume agent "`. The resumed subagent retains its full conversation history, including all previous tool calls, results, and reasoning. Note that built-in `Explore` and `Plan` agents are one-shot and do not emit `agentId`, so they cannot be resumed. 🛠 How to Use ```python # Python - resuming a subagent import re from claude_agent_sdk import query, ClaudeAgentOptions, AgentDefinition, ToolResultBlock AGENTS = { "endpoint-finder": AgentDefinition( description="Locates and catalogs API endpoints", prompt="Find and document API endpoints", tools=["Read", "Grep", "Glob"], ) } # First run: execute subagent and capture IDs agent_id = None session_id = None async for message in query( prompt="Use the endpoint-finder agent to find all API endpoints", options=ClaudeAgentOptions( allowed_tools=["Read", "Grep", "Glob", "Agent"], agents=AGENTS, ), ): if hasattr(message, "session_id"): session_id = message.session_id for block in getattr(message, "content", None) or []: if isinstance(block, ToolResultBlock): text = str(block.content) if match := "agentId:\s*([\w-]+)", text): agent_id = # Second run: resume the same session with a follow-up if agent_id and session_id: async for message in query( prompt=f"Resume agent {agent_id} and list the top 3 most complex endpoints", options=ClaudeAgentOptions( allowed_tools=["Read", "Grep", "Glob", "Agent"], agents=AGENTS, resume=session_id, # Resume the same session ), ): if hasattr(message, "result"): print(message.result) ``` 🏗 Integration into Production Systems - Break long analysis tasks into phases, review intermediate results, then resume for follow-up - Persist `session_id` and `agentId` to a database for resumption at any later time - Use custom agents or `general-purpose` (Explore/Plan cannot be resumed) - Pass the same agent definition in the `agents` parameter when resuming 💡 Use Cases 🔄 Conduct phased investigations of large codebases, reviewing results at each stage 💬 Interactive workflows with follow-up questions on subagent analysis results 📊 Run detailed follow-up analysis with a narrowed scope after initial exploration ⚠️ Caveats - Resuming requires the same `session_id`; new `query()` calls start fresh sessions by default - Built-in `Explore` and `Plan` agents are one-shot and do not output `agentId`, so they cannot be resumed - Subagent transcripts are automatically cleaned up based on `cleanupPeriodDays` (default: 30 days) - Main conversation compaction does not affect subagent transcripts ✨ With resume, subagents become ongoing analysis partners rather than one-shot throwaway tools. Use it for iterative, multi-phase investigations! #ClaudeAgentSDK# #AIAgent#
Show more
# Useful but Little-Known Features of ADK 2.0 🌍 What if your agent could remember conversations from last week and use that context to give better answers today? ADK 2.0's Memory feature provides agents with long-term knowledge that persists across sessions. It stores past conversations and learned information, retrieving them when needed. 📌 Title: Memory 🔗 URL: 🧩 Overview Unlike State, Memory manages long-term knowledge that spans across sessions. Three memory service implementations are available: InMemoryMemoryService for development and testing, VertexAiMemoryBankService for production with semantic search, and VertexAiRagMemoryService for vector-based RAG. Two built-in tools handle retrieval: PreloadMemory (auto-loads at session start) and LoadMemory (loads on demand). For programmatic access, use tool_context.search_memory(). You can also combine multiple memory services through custom tools. 🛠 How to use it Set up a memory service and add memory tools to your agent. ```python from google.adk.memory import InMemoryMemoryService from import PreloadMemory, LoadMemory # Development: in-memory implementation memory_service = InMemoryMemoryService() # Add memory tools to the agent agent = Agent( name="assistant", tools=[PreloadMemory(), LoadMemory()], ... ) # Configure the runner with the memory service runner = Runner( agent=agent, memory_service=memory_service, ... ) ``` To search memory programmatically from within a tool: ```python def my_tool(query: str, tool_context: ToolContext) -> str: results = tool_context.search_memory(query="past conversations") return str(results) ``` For multiple memory sources, create custom tools that integrate them together. 🏗 Building it into production ・Prototype quickly with InMemoryMemoryService, then switch to VertexAI services for production ・Use PreloadMemory to auto-load frequently needed context and improve response quality ・Design appropriate boundaries for what gets stored in memory to prevent data bloat ・Build custom tools to integrate multiple memory sources into a comprehensive knowledge base 💡 Use cases 🧠 Generate personalized responses based on past conversation history 📚 Retain long-term memory of project discussions and decisions 🔍 Automatically retrieve relevant past interactions via semantic search 🤝 Share a knowledge base across multiple agents using memory as a common layer ⚠️ Watch out InMemoryMemoryService loses all data when the process terminates — do not use it in production. VertexAI-based services require GCP setup and configuration. As stored data grows, search latency can be affected, so plan a data management strategy for your memory stores. ✨ Memory gives your agents the ability to carry context across sessions. It's a game-changer for building agents that deliver consistently better long-term user experiences. #ADK# #AIAgent#
Show more