# Using Eolas in Autonomous Agents

When you give an AI agent access to both EolasEdge and EolasReach MCP servers, the agent can:

1. **Monitor Markets**: Use `get_markets` and `get_trading_view_candles` to analyze market conditions
2. **Make Trading Decisions**: Execute trades using `place_order` when opportunities arise
3. **Share Insights**: Automatically post market analysis and trade updates using `create_twitter_post`
4. **Engage with Community**: Respond to mentions using `get_twitter_mentions` and `reply_to_twitter_post`
5. **Create Visual Content**: Generate charts and graphics using `generate_image` to illustrate market insights

The agent becomes autonomous - it can analyze markets, execute trades, and communicate its reasoning and actions to the world, all through the tools you've provided it access to.

#### Code Snippet: Giving Agent Access to MCP Tools

```python
# Pseudo-code using MCP Python SDK patterns
async def setup_eolas_agent():
    # Connect to EolasEdge MCP server
    async with stdio_client(eolas_edge_config) as (read, write):
        async with ClientSession(read, write) as session:
            init_response = await session.initialize()
            if init_response.capabilities.tools:
                app.register_mcp_server(session, supports_tools=True)
            app.set_server_ready(session)
    
    # Connect to EolasReach MCP server  
    async with stdio_client(eolas_reach_config) as (read, write):
        async with ClientSession(read, write) as session:
            init_response = await session.initialize()
            if init_response.capabilities.tools:
                app.register_mcp_server(session, supports_tools=True)
            app.set_server_ready(session)
    
    # Discover and register all available tools
    available_tools = []
    for session in app.mcp_server_sessions():
        tools_response = await session.list_tools()
        available_tools.extend(tools_response.tools)
    
    # Give the agent access to all discovered tools
    conversation.register_available_tools(available_tools)
    
    return app

# Now the agent has access to all Eolas tools automatically
agent = await setup_eolas_agent()
# Agent can now use: get_markets, place_order, create_twitter_post, etc.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eolas.gitbook.io/eolas/getting-started/using-eolas-in-autonomous-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
